Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- name = input()
- year = 1
- fail_count = 0
- total_grade = 0
- while year <= 12:
- grade = float(input())
- if grade < 4:
- fail_count += 1
- if fail_count == 2:
- break
- else:
- total_grade += grade
- year += 1
- if year >= 12:
- print(f"{name} graduated. Average grade: {total_grade/12:.2f}")
- else:
- print(f"{name} has been excluded at {year} grade")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement