Commit e6e64ab1 by BellCodeEditor

auto save

parent 8e0071c8
Showing with 8 additions and 2 deletions
username = "python" username = "python"
userpassword = "123456" #int userpassword = "123456" #int
num = 3
while True: while True:
if num>0:
uname = input("输入账号:") uname = input("输入账号:")
upass = input("输入密码:")#通过input()输入的所有数据,都是str(字符串) upass = input("输入密码:")#通过input()输入的所有数据,都是str(字符串)
num-=1
if uname == username and upass == userpassword: if uname == username and upass == userpassword:
print("登入成功!") print("登入成功!")
break break
if uname != username: if uname != username:
print("账号错误!") print("账号错误!")
continue else:
if upass != userpassword: if upass != userpassword:
print("密码错误!") print("密码错误!")
else:
print("账户锁定!")
exit()
print("欢迎回来!") 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