Question: using python to Write a program that reads a matrix from the keyboard and displays the summations of all its rows on the screen. The
using python to Write a program that reads a matrix from the keyboard and displays the summations of all its rows on the screen. The size of matrix (i.e. the number of rows and columns) as well as its elements are read from the keyboard.
Hint Use a list of lists to store your matrix. Your list could have as many elements as the number of the matrix rows that each element includes as many numbers as the size of the matrix column. For example, the list [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]] can represents the following matrix:
a sample program could be:
enter the number of rows of the matrix:
enter the number of columns of the matrix:
enter the element at row 1 and column1
enter the element at row 1 and column 2
...
the sum of the elements in the row 0 is
the sum of elements in the row 1 is
the sum of elements in row 2 is
...
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
