Question: Must be in Python(please have a screen shot on these solution code) 11.5 (Algebra: add two matrices) Write a function to add two matrices. The

Must be in Python(please have a screen shot on these solution code)Must be in Python(please have a screen shot on these solution code)

11.5 (Algebra: add two matrices) Write a function to add two matrices. The header of the function is def addMatrix(a, b): In order to be added, the two matrices must have the same dimensions and the same or compatible types of elements. Let c be the resulting matrix. Each element Cij is aij + bij. For example, for two 3 X 3 matrices a and b, c is Programming Exercises 383 11 12 13 13 a31 a32 a33 a3 b a32 b32 a33 +b33 Write a test program that prompts the user to enter two 3 X 3 matrices and dis- plays their sum. Here is a sample run Enter matrix1: 1 2 3 4 5 6 7 8 9 Enter Enter matrix2: 0 2 4 1 4.5 2.2 1.1 4.3 5.2 The matrices are added as follows: Enter 0.0 2.0 4. 4.0 5.0 6.01.0 4.5 2.2 5.0 11.5 8.2 1.1 4.3 5.2 1.0 2.0 3.0 1.0 4.0 11.0 11.0 8.0 11.0 8.1 12.3 14.2

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!