• Register
0 votes
39 views

Problem :

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

by (6.9k points)  

1 Answer

0 votes

Solution :

PFB code of the 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))
by (36.1k points)  
edited by
...