Commit 47c5db9e by BellCodeEditor

save project

parent aa6572b6
Showing with 7 additions and 0 deletions
...@@ -3,8 +3,11 @@ userpassword = "蔡浩然love张可力" # 保存在服务器数据库中的 ...@@ -3,8 +3,11 @@ userpassword = "蔡浩然love张可力" # 保存在服务器数据库中的
# 请用input()实现用户输入账号、密码的功能 # 请用input()实现用户输入账号、密码的功能
while True: while True:
i=3
a=input("密码") a=input("密码")
b=input("账号") b=input("账号")
i-=1
if i!=0
if a==username and b==userpassword: if a==username and b==userpassword:
print("成功") print("成功")
break break
...@@ -12,6 +15,9 @@ while True: ...@@ -12,6 +15,9 @@ while True:
print("用户名不存在,请重新输入!") print("用户名不存在,请重新输入!")
elif a==username and b!=userpassword: elif a==username and b!=userpassword:
print("密码输入错误,请重新输入!") print("密码输入错误,请重新输入!")
else:
print("账号锁定")
exit()
print("欢迎来到贝尔星球") print("欢迎来到贝尔星球")
# 如果用户输入的账号、密码正确,提示登陆成功 # 如果用户输入的账号、密码正确,提示登陆成功
\ No newline at end of file
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