Commit bb94fef6 by BellCodeEditor

auto save

parent 4104df94
Showing with 6 additions and 5 deletions
i=3
username = "python" username = "python"
userpassword = "123456" userpassword = "123456"
while True:
if i>0 if i>0:
i-=1
name = input("请输入用户名:") name = input("请输入用户名:")
password = input("请输入密码:") password = input("请输入密码:")
if name == username and password == userpassword: if name == username and password == userpassword:
...@@ -10,10 +11,10 @@ while True: ...@@ -10,10 +11,10 @@ while True:
break break
if name != username : if name != username :
print("错") print("错")
print("您所剩次数还有+str(i)+次机会") print("您所剩次数还有"+str(i)+"次机会")
elif password != userpassword: elif password != userpassword:
print("错") print("错")
print("您所剩次数还有+str(i)+次机会") print("您所剩次数还有"+str(i)+"次机会")
else: else:
print("已锁定") print("已锁定")
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