mardi 25 août 2020

i have a problem with the if statment not working as it should

Here is my code

1 tryagain = input("Sorry the password you entered is wrong,Do you want to try again? (reply with yes or no)")
  2 if tryagain == 'yes' or "Yes":
       3 passcode = input("Whats the passcode?")
  4 if passcode == "8819":
           5 print("Welcome Master ^^, how can i help you?")
   6 else:
           7 print("The passcode is wrong again")

but it just ignores the if statment in line 2 and goes to the next step in line 3 even if the input isnt yes or Yes, how can i fix that?

Aucun commentaire:

Enregistrer un commentaire