Commit 0b147ef9 by BellCodeEditor

save project

parent 7f799e29
Showing with 8 additions and 0 deletions
......@@ -4,13 +4,21 @@ userpassword = "123456" # 保存在服务器数据库中的用户密码(正
while True:
name = input("请输入账号:")
password = input("请输入密码:")
a+=1
if name !=username:
print("账号不存在")
print("登陆失败,您还有"+sty(5-a)+"次机会")
continue
elif password !=userpassword:
print("密码错误")
print("登陆失败,您还有"+sty(5-a)+"次机会")
continue
elif name == username and password == userpassword:
print("登陆成功)
break
if a==5:
print("已锁定")
break
# 请用input()实现用户输入账号、密码的功能
......
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