Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- score_break = int(input())
- poor_grades = 0
- last_name = ''
- counter = 0
- average = 0
- while True:
- name = input()
- if name == "Enough":
- print(f'Average score: {average / counter:.2f}')
- print(f'Number of problems: {counter}')
- print(f'Last problem: {last_name}')
- break
- score = int(input())
- if score > 4:
- last_name = name
- else:
- poor_grades += 1
- average += score
- counter += 1
- if poor_grades == score_break:
- print(f'You need a break, {poor_grades} poor grades.')
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement