Question: Create a Python source file that reads an unspecified number of integers into a list and calculates the following statistical calculations: The mean is the

Create a Python source file that reads an unspecified number of integers
into a list and calculates the following statistical calculations:
The mean is the sum of the integers divided by the number of integers in the list.
The median is the integer in the middle of the sorted list. If the list has an even number
of integers, then the median is the average of the two integers in the middle.
The range is the smallest integer subtracted from the largest integer.
The population standard deviation (not the sample standard deviation, which is a
different formula) is calculated as follows:
When getting the inputted integers from the console, you are to store the integers into a list by
using the split method wherever there is a blank. Since the resulting list will be a list of strings,
youll need to loop through the list and convert each integer string into an int datatype. Then,
you can use the sort method on the list of ints (e.g. integerList.sort()), print the sorted list, and
then perform each of the statistical calculations on the sorted integerList. You will need to
import the math module to use the power and square root functions (math.pow() and
math.sqrt()) for the standard deviation calculation. Your output should be formatted exactly as
these sample runs below.
Sample run1:
Enter integers separated by blanks: 3123123
Sorted integer list [1,1,2,2,3,3,3]
Mean=2.142857142857143
Median=2
Range=2
Standard deviation =0.8329931278350429

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 Programming Questions!