I am coding an impossible quiz game, and it doest work. I want the program to exit when the var fails is equal to 3.
Instead, when you enter a wrong answer three times, the program loops rather quitting.
print("Welcome to impossible quiz")
print("")
print("You get 3 fails then you're out")
print("")
startcode = int(input("Enter 0 to continue: "))
fails = 0
if startcode != 0:
exit(1)
print("Welcome")
print("")
print("Level one")
L1ans = input("1+1= ")
while L1ans != "window":
print("incorect")
fails = fails + 1
L1ans = input("1+1= ")
if fails = 3:
exit(1)