我正在尝试制作一个登录系统,但阻止我的是我无法调试的名称错误
know = input("Do you want to signup or log-in \n for signup enter (s) \n for log-in enter (l):")
if know == "s":
user_signup = input("Enter username:")
user_signup2 = input("Enter password: ")
user_signup3 = int(input("Enetr Age:"))
theinfo = [user_signup , user_signup2,user_signup3]
if know =="l":
login = input("Enter username: ")
user_login2 = input("Enter password:")
elif login in theinfo and user_login2 in theinfo:
print("Log in seccefull")
elif login not in theinfo or user_login2 not in theinfo:
print("username or password incorect")
这是我发现的错误:
Traceback (most recent call last):
File "E:\code\gg\.vscode\login.py", line 11, in <module>
elif login in theinfo and user_login2 in theinfo:
NameError: name 'login' is not defined
慕标5832272
斯蒂芬大帝
相关分类