Advertisement
HristoBaychev

Best Player

Jan 31st, 2023
814
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. max_goal_player = 0
  2. name_of_max_goal = str
  3. the_name = str
  4.  
  5. command = input()
  6. while command != 'END':
  7.     goals = int(input())
  8.  
  9.     max_goal_player = max(goals, max_goal_player)
  10.  
  11.     if max_goal_player >= 3:
  12.         the_name = command
  13.     else:
  14.         the_name = command
  15.  
  16.     if max_goal_player >= 10:
  17.         break
  18.  
  19.     command = input()
  20.  
  21. print(f'{the_name} is the best player!')
  22.  
  23. if max_goal_player >= 3:
  24.     print(f"He has scored {max_goal_player} goals and made a hat-trick !!!")
  25. else:
  26.     print(f"He has scored {max_goal_player} goals.")
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement