mercredi 9 décembre 2020

How to make my if statement run code within the statement after the result is produced?

I have an if (else) statement in my code and but when I attempt to execute the code it does not run, but I do not get a notification that there is a syntax error etc. I think I may be missing something but I am not sure what.

This is my current code: NewUserOrOldUser= input ("Have you played this game before?") if NewUserOrOldUser is "yes": VerifyUn= input("Please enter the username you chose") VerifyPw= input("Please enter the password you chose") VerfifyUnPw= VerfiyUn + VerifyPw if VerifyUnPw in open("Un & Pw").read(): print ("Proceed") else: print ("The data you inputted was incorrect, please try again") if NewUserOrOldUser is "no":

Aucun commentaire:

Enregistrer un commentaire