Commit 6f44c351 by BellCodeEditor

save project

parent 0a38b6ae
Showing with 3 additions and 4 deletions
......@@ -6,6 +6,8 @@ while True:
usersname=input("请输入账号:")
if username != usersname:
print("账号错误,请重新输入")
i-=1
print("温馨提示:您还有"+str(i)+"次机会")
continue
userspassword=input("请输入密码:")
if usersname==username and userspassword==userpassword:
......@@ -14,6 +16,7 @@ while True:
else:
print("密码错误,请重新输入")
i-=1
print("温馨提示:您还有"+str(i)+"次机会")
else:
print("错误次数已超出,已冻结。")
exit()
......
......@@ -11,9 +11,6 @@ while True:
userspassword=input("请输入密码:")
if userspassword != userpassword:
print("密码错误,请重新输入")
i-=1
else:
else:
break
print("登陆成功,欢迎来到python世界!")
\ 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