Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- goals = 0
- max_gols = -sys.maxsize
- best_player_name = ''
- flag = False
- while True:
- name = input()
- if name == 'END':
- flag = True
- break
- goals = int(input())
- if goals >= 10:
- best_player_name = name
- flag = True
- break
- if goals > max_gols:
- max_gols = goals
- best_player_name = name
- if flag:
- print(f'{best_player_name} is the best player!')
- if goals >= 3:
- print(f'He has scored {goals} goals and made a hat-trick !!!')
- else:
- print(f'He has scored {goals} goals.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement