Python Basics- Graduation_Part2 exercise
Здравейте, бих желала да попитам защо в Pycharm задачата работи, а judge дава 44/100?
name = input()
counter_grade = 1
sum_grades = 0
counter_bad_grades = 1
while counter_grade <= 12:
grade = float(input())
if grade >= 4:
sum_grades += grade
counter_grade += 1
counter_bad_grades = 0
else:
counter_bad_grades += 1
if counter_bad_grades <= 1:
counter_grade += 1
counter_bad_grades += 1
elif counter_bad_grades > 1:
print(f"{name} has been excluded at {counter_grade - 1} grade")
avg_grade = sum_grades / 12
print(f"{name} graduated. Average grade: {avg_grade:.2f}")