This is a Python Program to Calculate the Average of Numbers in a Given List.




This is a Python Program to Calculate the Average of Numbers in a Given List.


n=int(input("Enter the number of elements to be inserted: "))
a=[]
for i in range(0,n):
elem=int(input("Enter element: "))
a.append(elem)
avg=sum(a)/n
print("Average of elements in the list",round(avg,2))

Post a Comment

Post a Comment (0)

Previous Post Next Post