Commit 1e8ceb61 by BellCodeEditor

save project

parent 2e9446aa
Showing with 6 additions and 0 deletions
username = "erer" username = "erer"
userpassword = "123456" userpassword = "123456"
i=3
while True: while True:
name = input("请输入用户名:") name = input("请输入用户名:")
password = input("请输入密码:") password = input("请输入密码:")
...@@ -7,7 +8,11 @@ while True: ...@@ -7,7 +8,11 @@ while True:
print("登录成功!") print("登录成功!")
break break
elif name!=username: elif name!=username:
i-=1
print("用户名错误,请重新输入") print("用户名错误,请重新输入")
else: else:
print("密码错误请重新输入") print("密码错误请重新输入")
if i==0:
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