ExistingUser = input("Please enter either Y or N: ")
if (ExistingUser) == "N" or "n":
newName = input("Please enter your name: ")
with open("Userdata.txt", "a") as f:
print(newName, file = f)
newUserID = input("Please enter your desired username: ")
with open("Userdata.txt", "a") as f:
print(newUserID, file = f)
newPassword = input("Please enter your desired password: ")
with open("Userdata.txt", "a") as f:
print(newPassword, file = f)
f.close()
elif (ExistingUser) == "Y" or "y":
existingUserID = input("Please enter your username: ")
with open("Userdata.txt") as f:
if (ExistingUserID) in f.read():
print("True")
当我输入 Y 或 y 时,它应该会触发登录过程。相反,它会触发注册。
拉莫斯之舞
LEATH
相关分类