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