Commit 47c5db9e by BellCodeEditor

save project

parent aa6572b6
Showing with 14 additions and 7 deletions
...@@ -3,15 +3,21 @@ userpassword = "蔡浩然love张可力" # 保存在服务器数据库中的 ...@@ -3,15 +3,21 @@ userpassword = "蔡浩然love张可力" # 保存在服务器数据库中的
# 请用input()实现用户输入账号、密码的功能 # 请用input()实现用户输入账号、密码的功能
while True: while True:
i=3
a=input("密码") a=input("密码")
b=input("账号") b=input("账号")
if a==username and b==userpassword: i-=1
print("成功") if i!=0
break if a==username and b==userpassword:
elif a!=username: print("成功")
print("用户名不存在,请重新输入!") break
elif a==username and b!=userpassword: elif a!=username:
print("密码输入错误,请重新输入!") print("用户名不存在,请重新输入!")
elif a==username and b!=userpassword:
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