Commit 3bc4b81c by BellCodeEditor

save project

parent 901af2b6
Showing with 16 additions and 10 deletions
i=3
username = "lhy" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "091021" # 保存在服务器数据库中的用户密码(正确的密码)
while True:
n=input('请输入账号')
p=input('请输入密码')
if n==username and p==userpassword:
print('登入成功')
break
if n!=username:
print("账号输入错误")
if p!=userpassword:
print("密码输入错误")
print('请重新登录')
if i>0:
n=input('请输入账号')
p=input('请输入密码')
i-=1
if n==username and p==userpassword:
print('登入成功')
break
if n!=username:
print("账号输入错误")
if p!=userpassword:
print("密码输入错误")
print('请重新登录')
else:
print("次数已用尽,账号已冻结")
exit()
print("恭喜你,登入成功")
......
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