try: score = input("输入分数:") s = int(score) if s < 0: print("不能小于0") elif s < 60: print("不及格") elif s < 70: print("及格") elif s < 80: print("良好") elif s <= 100: print("优秀") else: print("数值太大") except ValueError: print("请输入数字")