在最后一行中,我试图将输出四舍五入,但是当我测试这个时,我得到了一个意外的 EOF 错误。请帮忙?
count = 0
scoreSum = 0
score = 0
while score != 999:
score = float(input("Enter test score or enter 999 to finish: "))
if score > 0 and score < 100:
scoreSum += score
count += 1
elif (score <0 or score > 100) and score != 999:
print("This score is invalid, Enter 0-100")
else:
print ("your average is: ", round((scoreSum / count), 2)