Python成绩计算怎么编码

我的程序PTA总是非零返回,实在没办法了,想请教各位,帮一下大学生吧!

img



i = 0
total_score = 0
total_pass= 0
total_notpass= 0

while True:
    score = int(input('请输入第{}个学生的成绩:'.format(i+1)))
    if score == -1:
        break
    else:
        total_score+=score
        if score >= 60:
            total_pass+=1
        else:
            total_notpass+=1

        i += 1

print('班级平均成绩为{}'.format(total_score//i))
print('班级及格人数为{}'.format(total_pass))
print('班级不及格人数为{}'.format(total_notpass))


非零返回一般是程序报错了,贴出来看看吧