Advertisement
GeorgiLukanov87

best_player100/100

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