Advertisement
Nenogzar

Untitled

Oct 15th, 2023
657
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. max_goals = 0
  2. max_goals_player = ""
  3.  
  4.  
  5. player = input()
  6. while player != "END":
  7.     goals = int(input())
  8.     if goals > max_goals:
  9.         max_goals = goals
  10.         max_goals_player = player
  11.     if goals >= 10:
  12.         break
  13.     player = input()
  14.  
  15. print(f"{max_goals_player} is the best player!")
  16. if 3 <= max_goals:
  17.     print(f"He has scored {max_goals} goals and made a hat-trick !!!")
  18. else:
  19.     print(f"He has scored {max_goals} goals.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement