请问下面这段代码哪里出现了错误?一运行系统提示语法错误,可是我看来好久没看出哪里有问题。把elif里的变量直接改成数字也说我语法错误p = 100a = 90b = 80c = 60d = 40e = 0score = int(input('what is your score? ' )if score > p:print('error!')elif score >= a:print('A')elif score >= b:print('B')elif score >= c:print('C')elif score >= d:print('D')elif score >= e:print('E')else:print('error!')
1 回答
Qyouu
TA贡献1786条经验 获得超11个赞
p = 100
a = 90
b = 80
c = 60
d = 40
e = 0
score = int(input('what is your score?'))
if score > p:
print('error!')
elif score >= a:
print('A')
elif score >= b:
print('B')
elif score >= c:
print('C')
elif score >= d:
print('D')
elif score >= e:
print('E')
else:
print('error!')
添加回答
举报
0/150
提交
取消