88. Python Program to find Mean, Variance and Standard Deviation of given n numbers.
How does this program work?
- This program is used to find mean, variance and standard deviation of given numbers using Python.
Here is the code
import statistics
a = list()
number = int(input( "Enter the number of elements you want: "))
print ('Enter numbers in array: ')
for i in range(int(number)):
n = input( "number : ")
a.append ( int ( n ))
print("Given 'n' numbers: ")
print(a)
m = statistics.mean ( a )
v = statistics.variance ( a )
st = statistics.stdev ( a )
print( "Mean: ",m)
print( "Variance: ",v)
print( "Standard Deviation: ",st)