else & elif statements not working in Python

后端 未结 9 994
礼貌的吻别
礼貌的吻别 2020-12-10 11:06

I\'m a newbie to Python and currently learning Control Flow commands like if, else, etc.

The if statement is working all fine

9条回答
  •  攒了一身酷
    2020-12-10 11:49

     if guess == number:
         print ("Good")
     elif guess == 2:
         print ("Bad")
     else:
         print ("Also bad")
    

    Make sure you have your identation right. The syntax is ok.

提交回复
热议问题