Question: ( 3 6 ) Write a function to calcMean ( ) . The function takes a list as its parameter. It should calculate the mean

(36) Write a function to calcMean(). The function takes a list as its parameter. It should calculate the mean (average) of all elements in the list and return the mean. You can assume all elements of the list are numeric.
Hint: Use sum() and len() functions.
You may test the function with this statement:
x =[1,2,3,4]
print(calcMean(x))
If the output is 2.5, then your function is ok.

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