Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- count_cake = int(input())
- check_count_cake = count_cake
- current_name = ''
- current_scores = 0
- win_name = ''
- win_scores = 0
- while check_count_cake:
- name_master = input()
- total_grade = 0
- while True:
- grade = input()
- if grade == 'Stop':
- break
- grade = int(grade)
- total_grade += grade
- print(f'{name_master} has {total_grade} points.')
- if total_grade > win_scores:
- win_scores = total_grade
- win_name = name_master
- print(f'{win_name} is the new number 1!')
- check_count_cake -= 1
- print(f'{win_name} won competition with {win_scores} points!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement