Commit 58dd0a7f by BellCodeEditor

save project

parent f30688ee
Showing with 12 additions and 11 deletions
...@@ -3,17 +3,18 @@ username = "python" ...@@ -3,17 +3,18 @@ username = "python"
userpassword = "123456" userpassword = "123456"
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 == userpassword: print("2次")
print("登录成功!") if name == username and password == userpassword:
break print("登录成功!")
if name != username: break
print("用户名错误!") if name != username:
continue print("用户名错误!")
if password != userpassword continue
print("密码错误!") if password != userpassword
print("密码错误!")
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