I have recently started learning Python, and the experience has been great, however, last night, I tried to make a simple program, and it is acting very strange
I have tried to change the locations of variables, and what they store/handle, and nothing I try seems to be working
def RF():
user_type = input("Are you a new user? ")
if user_type is "Yes" or "yes":
ID = random.randrange(1, 999999)
print("Your new ID Number is: " + str(ID))
name = input("Please enter your name: ")
password = input("Password: ")
ID = input("Account ID: ")
writtingID = open('Acc info.txt', 'w')
writtingID.write("ID: " + str(ID) + " | NAME: " + name + " | PASS: " + password)
writtingID.close()
elif user_type is "No" or "no":
name = input("Please enter your name: ")
password = input("Password: ")
ID = input("Account ID: ")
RF()
When the code is ran, I expect it to jump straight to asking for a name, but when I type "No" or "no", it for some reason runs the print("Your new ID Number is: " + str(ID))
from a different if
statement