python 的if语句判断内容显示不全

源程序

score = int(input("please: "))
if score >= 60:
    if score >= 85:
        print("good")
    else:
        print("not bad")
else:
    print("bad")

我输入  300

结果为:

please: 300
good
***Repl Closed***

 

 

但是我输入:30

please: 30

***Repl Closed***

他就没有输出

print语句的内容

 

我用的是sublime  编写的

希望能有详细的解答,谢谢

 

 

 

 

要注意 if与else的位置,同一级别要对齐,包含与被包含的就要缩格

score = int (input('plese:'))
if score>= 60:
    if score>=85:
        print('good')
    else:
        print('not bad')
else:
    print('bad')

 

我自己运行正常啊,你的语法是不是不对

我这里运行是没有问题的,你检查一下else里面的语法

您好,我是有问必答小助手,您的问题已经有小伙伴解答了,您看下是否解决,可以追评进行沟通哦~

如果有您比较满意的答案 / 帮您提供解决思路的答案,可以点击【采纳】按钮,给回答的小伙伴一些鼓励哦~~

ps:问答VIP仅需29元,即可享受5次/月 有问必答服务,了解详情>>>https://vip.csdn.net/askvip?utm_source=1146287632

然后要注意中英文符号不要混用了