Question: 11. Create a Python file called questionIpy and write the following functions: (a) (5 points def matrixMul(A, B): 'Returns the multiplication of matrix A and

 11. Create a Python file called questionIpy and write the following

11. Create a Python file called questionIpy and write the following functions: (a) (5 points def matrixMul(A, B): 'Returns the multiplication of matrix A and B If the Matrix A and B cannot be multiplied, return back suitable error message (b) (5 points) def matrixT(A): Returns the Transpose of the Matrix A (c) (5 points) def matrixAdd(A, B): Returns the addition of Matrix A and B If the Matrix A and B cannot be added, return back suitable error message'"' . You can test your code out as follows: print matrixT(A) #This prints back the transpose of A print matrixHul(A,B) #This prints back the multiplication of A and B print matrixAdd (A,B) #This prints back the addition of A and B . You can visualize, the Python code.e. list of list as the following matrix: A-2 4 7 print matrixHul (A, B) #This prints back the multiplication of A and B For the above test case, your code will print out the following: [012, 19, 67], [17, 27, 96], [3, 6, 13]] B= [[1], [1], [1]] #This is a column vector print matrixMul (A,B) For the above test case, your code will print out the following Make sure to use Python 2.7.x when writing your code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!