Sichanov

best_player

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