猿问

python代码为什么运行不了

请问下面这段代码哪里出现了错误?一运行系统提示语法错误,可是我看来好久没看出哪里有问题。把elif里的变量直接改成数字也说我语法错误
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!')

HUWWW
浏览 954回答 1
1回答

Qyouu

p = 100a = 90b = 80c = 60d = 40e = 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!')
随时随地看视频慕课网APP

相关分类

Python
我要回答