if
elif
else
else if
代码示例:
1 2 3 4 5 6 7 8 9 10 11
score = int(input('请输入分数:')) if 0 <= score <= 100: if score < 60: print('不及格') elif score < 80: print('良') else: print('优') else: print('分数输入错误,分数范围为:0~100')
=== 全文完 ===