Commit 012fd948 by BellCodeEditor

save project

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