Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Don't change the code below
- student_heights = input("Input a list of student heights in cm or in ").split()
- for n in range(0, len(student_heights)):
- student_heights[n] = int(student_heights[n])
- # Don't change the code above
- sum_ = 0
- num = len(student_heights)
- avg = 0
- for i in range(0, len(student_heights)):
- sum_ += student_heights[i]
- avg = sum_ / num
- print(round(avg, 1))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement