运行结果及报错内容
dic={'A':4.0,'A-':3.7,'A+':3.3,'B':3.0,'B-':2.7,'C+':2.3,'C':2.0,'C-':1.5,'D':1.3,'D-':1.0}
temp=0
total=0
while True:
ch=input()
num_=dic.get(ch)
num=eval(input())
if ch=='-1':
break
else:
temp+=num
total+=num*num_
result=total/temp
print("{:.2f}".format(result))
报错:unexpected EOF while parsing
我想要达到的结果
输入-1时跳出循环
帮我康康是哪里出了问题 ball ball 了