1. Engineering
  2. Computer Science
  3. in python 30 please...

Question: in python 30 please...

Question details

You are asked to write a program with 4 functions and a test for these functions. The first function readList() reads from the keyboard a list of numbers. The numbers entered after being prompted, can be real numbers or integers separated by a space. The user is prompted by a message Enter a set of numbers (separated by space): Once the numbers are entered, the function returns a list with these numbers sorted from the smallest to the largest. The second function calculateMean() receives a list of numbers and calculates. The mean is then returned as a float. Remember the mean is the sum of all numbers divided by the number of numbers. More specifically: Mean Where N is the size of the list and x, is an element in the list. The third function calculateStandarDev()receives a list of numbers and calculates the standard deviation. This standard deviation is returned as a float. The standard deviation in statistics measures the spread of the numbers from the mean. It is the square root of the variance, which is the sum squared error divided by the number of values less 1. More specifically: Standard Deviation = (x Mean)2 The fourth function outlier) receives a list of numbers and returns a list of outliers from that initial list of numbers. An outlier is a number that is more than 3 standard deviations away from the Mean of the set of numbers. That is a number that is either bigger or smaller than the Mean by 3 times the standard deviation Once you write these functions, you can test them separately. Then write a program that asks a user to enter a list of numbers, displays the list sorted, the mean and the standard deviation as well as the list of outliers (if any) for that entered list. You should be able to enter numbers with a decimal point. The program should ask you whether you want to enter another set of data or quit. Here is an example of outputEnter a set of numbers (separated by space): 12 13 12 12 11 10 9 8 12 [8.0, 9.0, 10.0, 11.0, 11.0, 11.0, 11.0, 12.0, 12.0, 12.0, 12.0, 12.0, 13.0, 13.0, 14.0, 2000.0] The Mean is: 135.6875 Std Dev. is: 497.15225283609044 Outliers [2000.0] Do you want to enter more data? (Y/N) :y Std Dev. is:1.8124350015712645 Outliers -7.0, 8.01 Do you want to enter more data? (Y/N) :y Enter a set of numbers (separated by space): 10 11 12 11 13 12 14 11 10 11 -3 11 10 1 [-3.0, 10.0, 10.0, 10.0, 10.0, 11.0, 11.0, 11.0, 11.0, 11.0, 12.0, 12.0, 13.0, 14.0] The Mean is: 10.214285714285714 Std Dev. is: 3.984171980929836 Outliers -3.0] Do you want to enter more data? (Y/N) :n

In Python 3.0 Please.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution