Commit 07d3b823 by BellCodeEditor

save project

parent 945fc0d9
Showing with 18 additions and 7 deletions
username = "python" username = "python"
userpassword = "123456" userpassword = "123456"
i = 3
while True: while True:
name = input("请输入用户名:") if i > 0:
password = input("请输入密码:") name = input("请输入用户名:")
if name == username and password == userpassword: password = input("请输入密码:")
print("登录成功!") i = i-1
print("用户名和密码错误!请重新输入") print("您还剩",i,"次登录机会,请珍惜使用!")
print("欢迎来到贝尔编程!") if name == username and password == userpassword:
\ No newline at end of file print("恭喜您,登录成功!")
break
if name != username:
print("对不起,该用户名不存在,请再输入一遍!")
continue
if password != userpassword:
print("对不起,该密码错误,请再输入一遍!")
else:
print("对不起,您的账户已锁定!请带身份证前来解除!")
break
\ 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