score = int(input("请输入您的成绩: "))
if score>100 or score<0:
print("输入错误")
elif score >=90:
print("优")
elif score >=80:
print("良")
elif score >= 70:
print("中")
elif score >= 60:
print("及格")
else:
print("不及格")
注意:在python中语句格式为:
i f ----------- :
else : ------------ :
---------------