Skip to content

Commit c00fccb

Browse files
Merge pull request #220 from akash18sahoo/patch-1
Pyrthon program to calculate average of n numbers
2 parents 0884e74 + 4aeba3c commit c00fccb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Average.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
n=int(input("Enter the number of elements to be inserted: "))
2+
a=[]
3+
for i in range(0,n):
4+
elem=int(input("Enter element: "))
5+
a.append(elem)
6+
avg=sum(a)/n
7+
print("Average of elements in the list",round(avg,2))

0 commit comments

Comments
 (0)