desislava_topuzakova

Untitled

Jun 6th, 2021
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. command = str(input())
  2. goals_record = 0
  3. hat_trick = False
  4. best_player = ""
  5. while command != "END":
  6. current_player = command
  7. goals = int(input())
  8. if goals > goals_record:
  9. best_player = current_player
  10. goals_record = goals
  11. if goals >= 3:
  12. hat_trick = True
  13. if goals >= 10:
  14. break
  15. command = str(input())
  16. print(f"{best_player} is the best player!")
  17. if hat_trick:
  18. print(f"He has scored {goals_record} goals and made a hat-trick !!!")
  19. else:
  20. print(f"He has scored {goals_record} goals.")
Advertisement
Add Comment
Please, Sign In to add comment