jeudi 27 août 2015

Can I use an if statement inside an if statement

Is it possible to use an if statement inside of an if statement? For example:

If answer=10:
     answer2=input("Do you agree")
     if answer2=yes
         print("You agree")
     else: 
         print("You disagree")


else:
print("You don't answer")

Aucun commentaire:

Enregistrer un commentaire