We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ba0e41 commit 92a43d2Copy full SHA for 92a43d2
1 file changed
loops/for_loops.py
@@ -0,0 +1,14 @@
1
+# Input a Python list of student heights
2
+student_heights = input().split()
3
+for n in range(0, len(student_heights)):
4
+ student_heights[n] = int(student_heights[n])
5
+# 🚨 Don't change the code above 👆
6
+
7
+# Write your code below this row 👇
8
+total_height = 0
9
+total_count = 0
10
+for i in student_heights:
11
+ total_height += i
12
+ total_count += 1
13
14
+average_height = round(total_height / total_count)
0 commit comments