Commit 6ca42d6f by BellCodeEditor

save project

parent 85d1093d
Showing with 3 additions and 2 deletions
...@@ -2,10 +2,10 @@ i = 3 ...@@ -2,10 +2,10 @@ i = 3
username = "1111" username = "1111"
userpasswor = "1212" userpasswor = "1212"
while True: while True:
if i>0 if i>0
name = input"输入用户名" name = input"输入用户名"
password = input("输入密码") password = input("输入密码")
i--1 i-=1
if name ==username and password==userpasswor if name ==username and password==userpasswor
print("登陆成功") print("登陆成功")
break break
...@@ -14,6 +14,7 @@ while True: ...@@ -14,6 +14,7 @@ while True:
continue continue
if password !=userpassword: if password !=userpassword:
print("密码没有") print("密码没有")
print("温馨提示“您还有" + str(i)+"次登录机会")
else: else:
print("已锁定,30分钟再来") print("已锁定,30分钟再来")
exit() exit()
......
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