Objective
Create a Python program that calculates the mean, the median and the standard deviation of a series of numbers with the statistics module.
Instructions
- Import the
statisticsmodule. - Read an integer
nand thennintegers, one per line. - Calculate the mean (
statistics.mean), the median (statistics.median) and the population standard deviation (statistics.pstdev). - Show three lines:
Mean: M,Median: DandDeviation: S, all with two decimals.
5
2
4
4
4
5
Mean: 3.80
Median: 4.00
Deviation: 0.98
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise