Commit 3bc4b81c by BellCodeEditor

save project

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