Advertisement
eNeRGy90

Untitled

Nov 24th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. best_score = 0
  2. best_name = None
  3.  
  4. while True:
  5.     name = input()
  6.     if name == "END":
  7.         break
  8.  
  9.     goals_scored = int(input())
  10.  
  11.     if goals_scored > best_score:
  12.         best_score = goals_scored
  13.         best_name = name
  14.  
  15. print(f"{best_name} is the best player!")
  16.  
  17. if best_score >= 3:
  18.     print(f"He has scored {best_score} goals and made a hat-trick !!!")
  19. else:
  20.     print(f"He has scored {best_score} goals.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement