Teo_Yanchev

easter_competition_20-21-2019_exam

Jul 17th, 2020
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. easter_bread = int(input())
  2.  
  3. winner_points = 0
  4. winner_name = ""
  5. for i in range(1, easter_bread+1):
  6. name = input()
  7. command = input()
  8.  
  9. total_points = 0
  10. while command != "Stop":
  11. points = int(command)
  12. total_points += points
  13.  
  14. command = input()
  15. else:
  16. print(f"{name} has {total_points} points.")
  17. if total_points > winner_points:
  18. winner_points = total_points
  19. winner_name = name
  20. print(f"{name} is the new number 1!")
  21. print(f"{winner_name} won competition with {winner_points} points!")
Add Comment
Please, Sign In to add comment