Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python programming Write a program that reads a matrix from the keyboard and displays the summations of all its rows on the screen. The size

image text in transcribed

python programming

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. A sample execution of this program is illustrated below: Enter the number of rows of the matrix: 3 Enter the number of columns of the matrix: 4 Enter the element at row 1 and chd umn 1: 1 Enter the element at row 1 and column 2: 2 Enter the element at row 1 and column 3: 3 Enter the element at row 1 and column 4:4 Enter the element at row 2 and column 1: 5 Enter the element at row 2 and column 2: 6 Enter the element at row 2 and column 3 Enter the element at row 2 and column 4: Enter the element at row 3 and column 1: 9 Enter the element at row 3 and column 2: 10 Enter the element at row 3 and column 3: 11 Enter the element at row 3 and column 4: 12 The sum of elements in the row 0 15: The sum of elements in the row 0 is: 1t0 The um of element in the row 1 is: The um of elementa in the row 1 i31 26 The Burn of element, in the row 2 is: The um of elements in the row 2 ia: 42 8 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, 121]] can represents the following matrix: 2 9 10 11 12

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

Students also viewed these Databases questions

Question

5. Recognize your ability to repair and let go of painful conflict

Answered: 1 week ago