课后习题如何加入循环
score = int(input('请输入一个分数:'))if 80 > score >= 60:
print('C')
elif 90 > score >= 80:
print('B')
elif 60 > score >= 0:
print('D')
elif 100 >= score >= 90:
print('A')
else:
print('输入错误!') while True:
score = int(input('请输入一个分数:'))
if 80 > score >= 60:
print('C')
elif 90 > score >= 80:
print('B')
elif 60 > score >= 0:
print('D')
elif 100 >= score >= 90:
print('A')
else:
print('输入错误!')
页:
[1]