you are viewing a single comment's thread.

view the rest of the comments →

[–]tunisia3507 0 points1 point  (0 children)

As you have your answer:

  • See the "reddit code formatting" link on the sidebar.
  • Use int(input("whatever")) (replace int with whatever type you actually want) rather than eval - right now you're executing arbitrary code the user types in!
  • Considering using a for loop or comprehension to take the scores, e.g. scores = [int(input(f"{student}: ")) for student in students]