Commit 370443ec by BellCodeEditor

auto save

parent e6e64ab1
Showing with 13 additions and 20 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(字符串)
if name == username and password == userpassword:
num-=1 print("登入成功!")
if uname == username and upass == userpassword: break
print("登入成功!") if name == username:
break print("账号错误!")
if uname != username: if password == userpassword:
print("账号错误!") print("密码错误!")
else: print("登入失败!")
if upass != userpassword: \ No newline at end of file
print("密码错误!")
else:
print("账户锁定!")
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