Question: in python Write a sum_columns function that asks the number of rows and number of columns in a matrix, then asks each number in the

in python

Write a sum_columns function that asks the number of rows and number of columns in a matrix, then asks each number in the matrix and returns a list with the sum of each column in the matrix. Entry Two whole numbers that are the number of lines and the number of columns Whole numbers that are elements of the matrix, in total is the multiplication of the first two numbers

Output List with the sum of each column of the matrix

example:

3 1 2 4 5

OUTPUT

11

ex.2

1 4 7 3 4 5

output

[7, 3, 4, 5]

ex. 3

2 2 4 -1 3 6

Output

[7, 5]

ex.4

1 1 3

output

[3]

ex.5

3 4 2 8 6 4 8 2 1 4 6 7 1 9 

output

[16, 17, 8, 17]

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!