Question: python question. pls using easily solution Define a function called calculate average that accepts a list as a parameter and returns the average of the
Define a function called calculate average that accepts a list as a parameter and returns the average of the values in the list You may assume that all the values in the list are either integer numbers, floating point numbers, or are strings that represent floating point numbers. The average should be rounded to 2 decimal places and returned as a string with exactiy 2 decimal places HINT: String formatting commands may be useful here- see https://docs python.org/3/library/string html For example: caiculate average(11, '2.0 3.0]) would return the string 2.00 For example: Test Result x = calculate-average([1]) print(type(x))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
