When I type "no" into the input I expected it to add 1 to "x", therefore ending the loop, but what happens is that it ignores it and does not add 1 x. Here is the code.
x = 1
password = ""
while x == 1:
# imagine there is some code here which works
ans1 = input("\n\nTest a new password? ")
ans1 = ans1.upper()
print(ans1)
if ans1 == ("Y" or "YES"):
x = x
elif ans1 == ("N" or "NO"):
x = x + 10
print(x)
It's the bottom if/elif statement that is not working. It should continue to ask for input again until the user says NO but this isn't working.