Commit b12e293d by BellCodeEditor

auto save

parent 69263105
Showing with 28 additions and 7 deletions
username = "python" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "123456"
while True:
name=input("你的账号:")
password=input("你的密码:")
if name==username and password== userpassword:
print("登陆成功")# 保存在服务器数据库中的用户密码(正确的密码)
break
i=3
while True:
if i != 0:
name=input("你的账号:")
password=input("你的密码:")
i=i-1
if name==username and password== userpassword:
print("登陆成功")# 保存在服务器数据库中的用户密码(正确的密码)
break
if name!=username :
print("用户名错误")
print("你还有"+str(i)+"次机会 ")
continue
if password!= userpassword:
print("密码错误")
print("你还有 "+ str(i) +" 次机会 ")
else:
print("登陆失败")
print("身份验证失败")
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