Commit 012fd948 by BellCodeEditor

save project

parent 611e13ec
Showing with 10 additions and 4 deletions
username = "python" # 保存在服务器数据库中的用户账号(正确的账号) username = "python" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码) userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码)
name = input("请输入账号") i=3
pa = input("请输入密码")
# 请用input()实现用户
while True: while True:
if i>0:
name = input("请输入账号")
pa = input("请输入密码")
i-=1
if name == username and pa == userpassword: if name == username and pa == userpassword:
print("登入成功") print("登入成功")
break break
...@@ -13,6 +16,9 @@ while True: ...@@ -13,6 +16,9 @@ while True:
continue continue
if pa != userpassword: if pa != 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