provide a python script please For the following vectors and matrices, using the NumPy library, write...
Question 1 a. Define the following matrices in a script file (M-file), ? = ( 8 9 10 11; 23 9 16 15 ;11 12 3 6; 1 2 8 9 ) ? = ( 2 21 7 15; 12 4 8 22; 23 9 5 13; 23 4 21 22) ℎ = (4 9 12 15) b. Add suitable lines of codes to the M-file to do the following. Each of the following points should be coded in only...
IN PYTHON: Write a function that computes the outer product of two vectors WITHOUT using numpy / inbuilt functions. For example, the outer product of [1,2,3] x [1,2] is outer product 2 1 2 3 2 4 6 2 outer product 2 1 2 3 2 4 6 2
Task 4 Write a script that will print the following table using 2 loops (either for or while) 24 3 6 9 4 8 12 16 5 10 15 20 25
Write a script that uses four separate for loops to output the following: 1 2 3 4 5 6 7 8 2 4 6 8 10 12 14 16 3 6 9 12 15 18 21 24 10 9 8 7 6 5 4 3 2 1 complete in python3
Part 1: Using Idle Write a Python Script that Does the Following 1. At the top of your program, import the math library as in from math import * to make the functions in the math module available. Create a variable and assign into it a constant positive integer number of your choice. The number should be at most 10. 1 Suppose we call this variable x for this writeup document Try something like x = 4 2. Create another...
1. Create a Python script file called Assignment_Ch06-02_yourLastName.py. (Replace yourLastName with your last name.) 2. Write a Python program that prompts the user for a sentence, then replaces all the vowels in the sentence with an asterisk: '*' Your program should use/call your isVowel function from Assignment_Ch06-01. You can put the isVowel() function in a separate .py file, without the rest of the Ch06-01 code, and then import it. 6-01 CODE: def isVowel(x): if x in "aeiouyAEIOUY": return True else:...
(In Linux) 1. Create a file to write to from your script and save it as “.txt”. 2. Write the following information to the file that you created in Step 1: Today's date Your full name Your student ID The name of your course What directory you are in File permissions of the file that you created that allow everyone to read, write, and execute The long list of files in your current directory, providing all items and their process...
Write a script file that will compare entries in vector V to entries in vector M and determine how many entries in V are greater than the same entry in M, equal to the same entry in M, and less than the same entry in M. For example, V(1) is 7 and M(1) is 6, thus for this entry, V is greater than M. V = [7 9 -8 9 3 -8 -5 1 10 10 0 -7] M =...
MATLAB Question: Write a script for the problem pictured. Please send the script, not just the printout. Make sure your script allows you to input a value for n so when prompted, in the command window, user types n value. The n value should be the f_k if k ==1 .... Please also send print outs if you can. BELOW IS A SAMPLE ANSWER THAT DID NOT PUT THE INPUT SCRIPT NEEDED FOR THIS QUESTION TO BE CORRECT. YOU CAN...
using python with only using import math and copy no other powerful functions. Write a function defined as: def GaussSeidel(Aaug, x, Niter = 15): Purpose: use the Gauss-Seidel method to estimate the solution to a set of N linear equations expressed in matrix form as Ax = b. Both A and b are contained in the function argument – Aaug. Aaug: an augmented matrix containing [A | b ] having N rows and N+1 columns, where N is the number...