R8za

5.2 - High score

Jun 25th, 2022 (edited)
166
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None
  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. #Write your code below this row 👇
  9.  
  10. high_score = 0
  11. for scores in student_scores:
  12.     if scores > high_score:
  13.         high_score = scores
  14. print(f"The highest score in the class is {high_score}")
RAW Paste Data Copied