Commit 4b4a5e90 by BellCodeEditor

save project

parent c85a6918
Showing with 5 additions and 3 deletions
username = "python" username = "python"
userpassword = "1234567" userpassword = "1234567"
i = 4 i = 3
while True: while True:
if i != 0: if i != 0:
name = input("输入用户名:") name = input("输入用户名:")
...@@ -10,11 +10,13 @@ while True: ...@@ -10,11 +10,13 @@ while True:
break break
if name != username: if name != username:
i-=1 i-=1
print("用户名错误,请重新输入,还有",i,"次") print("用户名错误,请重新输入!")
print("温馨提示,还有"+str(i)+"次")
continue continue
if password != userpassword: if password != userpassword:
i-=1 i-=1
print("密码错误,请重新输入,还有次",i,"次") print("密码错误,请重新输入!")
print("温馨提示,还有次"+str(i)+"次")
continue continue
else: else:
print("你的账户已锁定,请一小时以后再来") print("你的账户已锁定,请一小时以后再来")
......
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