Question: Write a program to add two matrices a and b and save the result in c . Your program should fill the matrices a and

Write a program to add two matrices a and b and save the result in c.
Your program should fill the matrices a and b with random numbers in the range of 1
through 100. Display the matrices and their addition. You may not use any module other
than the random module. (In Python, you can implement a matrix as a two-dimensional
list.)
111213
212223
313233
+
111213
212223
313233
=
11+1112+1213+13
21+2122+2223+23
31+3132+3233+33
Sample run:
Matrix1:
92984
545620
326851
Matrix2:
988733
779467
911756
The addition of the matrices is:
107116117
13115087
12385107

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 Programming Questions!