Commit a67a2a70 by BellCodeEditor

save project

parent f464f7c1
Showing with 7 additions and 3 deletions
i = 3 i = 4
username = "python" username = "python"
userpassword = "123456" userpassword = "123456"
while True: while True:
...@@ -9,10 +9,13 @@ while True: ...@@ -9,10 +9,13 @@ while True:
if name == username and password == userpassword: if name == username and password == userpassword:
print("登录成功!") print("登录成功!")
break break
if name != username: elif name != username:
input("用户名错误,请重新输入!") input("用户名错误,请重新输入!")
print("温馨提示:您还有"+str(i)+"次机会")
continue continue
if password != userpassword: else:
input("密码错误,请重新输入!") input("密码错误,请重新输入!")
print("温馨提示:您还有"+str(i)+"次机会")
print("你的账户已被锁定,请使用其他方法解锁!") 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