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 eg 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 mathpow and
math.sqrt for the standard deviation calculation. Your output should be formatted exactly as
these sample runs below.
Sample run:
Enter integers separated by blanks:
Sorted integer list
Mean
Median
Range
Standard deviation
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
