Question: PYTHON CODE PLEASE Complete the calc_average() method that has an integer list parameter and returns the average value of the elements in the array as
PYTHON CODE PLEASE
Complete the calc_average() method that has an integer list parameter and returns the average value of the elements in the array as a double.
Ex: If the input array is:
1 2 3 4 5 then the returned average will be:
3.0 def calc_average(nums): '''Type your code here''' if __name__ == '__main__': nums = [1, 2, 3, 4, 5] print(calc_average(nums)) # calc_average() should return 3.0
Step by Step Solution
There are 3 Steps involved in it
def calcaveragenums retu... View full answer
Get step-by-step solutions from verified subject matter experts
