Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- easter_bread = int(input())
- score = None
- top_chef = None
- max_score = 0
- for i in range(1, easter_bread + 1):
- name = input()
- score = int(input())
- score_sum = 0
- while score != 'Stop':
- score_num = int(score)
- if score_num <= 0 or score_num > 10:
- score = input()
- continue
- score_sum += score_num
- score = input()
- print(f'{name} has {score_sum} points.')
- if score_sum > max_score:
- max_score = score_sum
- top_chef = name
- print(f'{name} is the new number 1!')
- print(f'{top_chef} won competition with {max_score} points!"')
Advertisement
Add Comment
Please, Sign In to add comment