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

[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

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!