Question: In python: [7] (20 Points) Assume you have a list containing the population of different cities. For example: >>city_populations [2123, 1284, 7031, 30788, 147, 2217,
In python:![In python: [7] (20 Points) Assume you have a list containing the](https://s3.amazonaws.com/si.experts.images/answers/2024/09/66deca3a8c0b2_79466deca3a1a701.jpg)
[7] (20 Points) Assume you have a list containing the population of different cities. For example: >>city_populations [2123, 1284, 7031, 30788, 147, 2217, 10000] Write a function called "getStats" that has one (1 input parameter (the list of city populations) and zero (0) output parameters and performs the following: Sorts the city populations in both ascending and descending order. Calculates the maximum, minimum, average, and standard deviation. Prints all of these results to the screen for the user to see You can use the built-in list functions: max0., min0, sum0, len0, etc. First, define a function calculating the average of the input list called "getMean" The function "getMean" should have one (1) input parameter (the list) and one (1) output parameter (the mean value)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
