|
1鱼币
想要右边的一直查询,按下e结束
我这个一直是B
x=int(input('please a num:'))
while x!='e':
if 0<=x<=100:
if x==100:
print('S')
else:
if x>=90:
print('A')
else:
if x>=80:
print('B')
else:
if x>=60:
print('C')
else:
print('D')
else:
print('input error')
"""score = input("请输入你的分数:")
score = int(score)
if score < 60:
print("D")
if 60 <= score < 80:
print("C")
if 80 <= score < 90:
print("B")
if 90 <= score < 100:
print("A")
if score == 100:
print("S")"""
循环里加入input
- x=input('please a num:')
- while x!='e':
- x=int(x)
- if 0<=x<=100:
- if x==100:
- print('S')
- else:
- if x>=90:
- print('A')
- else:
- if x>=80:
- print('B')
- else:
- if x>=60:
- print('C')
- else:
- print('D')
- x = input('please a num:')
- else:
- print('input error')
- x = input('please a num:')
- else:
- print('退出')
复制代码
|
|