Question: This is python using visual studio code. Write a Python function listStats() that takes a list of numbers as input and returns the minimum, maximum
This is python using visual studio code.
Write a Python function listStats() that takes a list of numbers as input and returns the minimum, maximum and average values in a new list (i.e. list of length 3, where the item at index O is the minimum, the item at index 1 is the maximum, and the item at index 2 is the average. Write a second Python function printStats () that takes a list of 3 numbers representing minimum, maximum, and average values for a lists (i.e. the output from the listStats() function) and prints them out rounded to 3 decimal places. For example, listStats([12.5, -36.375, 100, 0.0]) should return [-36.375, 100, 19.03125], and printStats([-36.375, 100, 19.03125]) would print the following to the Terminal: The minimum is -36.375, the maximum is 100.000, the average is 19.031 Hint: You should use your listStats function to test your printStats function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
