questionnumber=0
color=("Red")
userask=input("What color of the rainbow am I thinking of? ")
color = userask
if color == "Red":
print("CORRECT")
else:
print("INCORRECT")
questionnumber = questionnumber+1
#print(questionnumber)
while color != "Red":
userask=input("What color of the rainbow am I thinking of? ")
color = userask
if color == "Red":
print("CORRECT")
else:
print("INCORRECT")
questionnumber = questionnumber+1
#print (questionnumber)
if questionnumber>3:
quitter=input("Do you want to quit? ")
if quitter == "yes"or"Yes":
break
else:
continue
So the idea is you have to guess the correct color which in this case is red. But after three attempts, the program asks the user if they want to quit; if yes, the while loop stops, and if no, the while loop continues for another three attempts. I can't seem to figure out why the loop ends regardless of the user's answer.