Skip to content

Commit 9a315d7

Browse files
committed
exercise_14.py
1 parent 917480f commit 9a315d7

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

exercise_14.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
height_list=[]
2+
heights=input("enter heights seperated by space:")
3+
height_list=heights.split()
4+
count=0
5+
for height in height_list:
6+
count+=1
7+
print(count)
8+
for i in range(count):
9+
height_list[i]=int(height_list[i])
10+
print(height_list)
11+
total=0
12+
for person in height_list:
13+
total+=person
14+
print(total)
15+
avg_height=total/count
16+
print(round(avg_height))
17+

0 commit comments

Comments
 (0)