Question: write a function called calculateaverage which accepts an array of Numbers. the function should return the average or mean of all numbers in the array.

write a function called calculateaverage which accepts an array of Numbers. the function should return the average or mean of all numbers in the array. if the array is empty , return 0.calculateAverage
Write a function called calculateAverage which accepts an array of
numbers. The function should return the average or mean of all
numbers in the array. If the array is empty, return 0.
calculateAverage [1,3,2]??2
calculateAverage [4,10,4,10]??7
calculateAverage [100]??100
calculateAverage([])??0
1># !/ bin/python 3cdots
#
# Complete the 'calculateAverage' function below.
#
# The function is expected to return an INTEGER.
# The function accepts INTEGER_ARRAY numbers as parameter.
#
E112 expected an indented block pycodestyle(E112)
expected an indented block after function definition on line 18 pyflakes
View Problem (Alit+F8). No quick fixes available
> if name ?mon==' main 1:cdots
 write a function called calculateaverage which accepts an array of Numbers.

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!