Commit dca89694 by BellCodeEditor

auto save

parent b810c294
Showing with 25 additions and 0 deletions
username = "111"
userpassword = "222"
i = 3
while True:
if i>0:
name = input("请输入账号:")
if name != username:
print("账号输入错误")
i -= 1
print("当前还剩余"+str(i)+"次")
continue
password = input("请输入密码:")
if name == username and password == userpassword:
print("账号密码正确")
break
if password != userpassword:
print("密码输入错误")
i -= 1
print("当前还剩余"+str(i)+"次")
continue
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