Skip to content

Commit 37037dc

Browse files
committed
Day 5 preparation - output highest score
1 parent ec55992 commit 37037dc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# 🚨 Don't change the code below 👇
2+
student_scores = input("Input a list of student scores ").split()
3+
for n in range(0, len(student_scores)):
4+
student_scores[n] = int(student_scores[n])
5+
# print(student_scores)
6+
# 🚨 Don't change the code above 👆
7+
8+
# Important you are not allowed to use the max() or min() functions. The output words must match the example.
9+
10+
# Write your code below this row 👇
11+
highestNum = student_scores[0]
12+
for score in student_scores:
13+
if score > highestNum:
14+
highestNum = score
15+
print(f"The highest score in the class is: {highestNum}")

0 commit comments

Comments
 (0)