Commit de2c85ba by BellCodeEditor

save project

parent d85b2949
Showing with 5 additions and 2 deletions
username = "罗是鑫的情报" # 保存在服务器数据库中的用户账号(正确的账号) username = "罗是鑫的情报" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "蔡浩然love张可力" # 保存在服务器数据库中的用户密码(正确的密码) userpassword = "蔡浩然love张可力" # 保存在服务器数据库中的用户密码(正确的密码)
# 请用input()实现用户输入账号、密码的功能 # 请用input()实现用户输入账号、密码的功能
i=3
while True: while True:
i=3
a=input("密码") a=input("密码")
b=input("账号") b=input("账号")
i-=1 i-=1
...@@ -13,8 +12,12 @@ while True: ...@@ -13,8 +12,12 @@ while True:
break break
elif a!=username: elif a!=username:
print("用户名不存在,请重新输入!") print("用户名不存在,请重新输入!")
c=str(i)
print("还剩"+c+"次机会")
elif a==username and b!=userpassword: elif a==username and b!=userpassword:
print("密码输入错误,请重新输入!") print("密码输入错误,请重新输入!")
d=str(i)
print("还剩"+d+"次机会")
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