Commit 370443ec by BellCodeEditor

auto save

parent e6e64ab1
Showing with 8 additions and 15 deletions
username = "python" username = "python"
userpassword = "123456" #int userpassword = "123456"
num = 3
while True: while True:
if num>0: name = input("输入账号:")
uname = input("输入账号:") password = input("输入密码:")
upass = input("输入密码:")#通过input()输入的所有数据,都是str(字符串)
num-=1 if name == username and password == userpassword:
if uname == username and upass == userpassword:
print("登入成功!") print("登入成功!")
break break
if uname != username: if name == username:
print("账号错误!") print("账号错误!")
else: if password == userpassword:
if upass != userpassword:
print("密码错误!") print("密码错误!")
else: print("登入失败!")
print("账户锁定!") \ No newline at end of file
exit()
print("欢迎回来!")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment