Question: Python program that will send a matrixto a function.In this function, you will return an average value which is the sum of all the elements

Python program that will send a matrixto a function.In this function, you will return an average value which is the sum of all the elements divided by the total number of the elements. Do not forget to add comments to explain your code.

For example:

-The matrix is:mx = [ [2, 10, 40, 5], [20, 20, 5, 8], [20, 10,4, 6], [7, 20, 3, 10] ]

-Output:Average value= 11.875

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!