Commit 7b21f464 by BellCodeEditor

save project

parent 4f46b8ec
Showing with 8 additions and 6 deletions
...@@ -7,12 +7,14 @@ while True: ...@@ -7,12 +7,14 @@ while True:
password = input(请输入密码:") password = input(请输入密码:")
i=i-1 i=i-1
if name ==username and password == userpassword: if name ==username and password == userpassword:
print("登陆成功!") print("登陆成功!")
break break
elif name != uesrname: elif name != uesrname:
print("用户名不存在,请重新输入!") print("用户名不存在,请重新输入!")
else: print("温馨提示:您还有"+str(i)+"次登录机会")
print("密码输入有误,请重新输入!") continue
else:
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