Write a python program to find mean, median, mode for the given set of numbers in a list.

 from statistics import mean,median,mode

l=[]

elesize=int(input("Enter the size of the list"))

print("Enter the list elements upto",elesize)

for i in range(elesize):

    ele=int(input())

    l.append(ele)

print("The list is",l)

print("The mean of given list is",mean(l))

print("The median of given list is",median(l))

print("The mode of given list is",mode(l))


Comments

Popular posts from this blog

Write a python program to compute cumulative product of a list of numbers (write function cumulative_product).

Write a Python program to compute distance between two points taking input from the user. Formula for Pythagorean theorem for compute distance between two points is: