Commit 915c813a by BellCodeEditor

save project

parent 4b78173e
Showing with 17 additions and 13 deletions
username = "python" # 保存在服务器数据库中的用户账号(正确的账号) username = "python" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码) userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码)
i=3
# 请用input()实现用户输入账号、密码的功能 # 请用input()实现用户输入账号、密码的功能
while True: while True:
q=input('请输入帐号:') if i > 0:
passward=input('请输入密码:') q=input('请输入帐号:')
passward=input('请输入密码:')
if q == username and passward == userpassword: i -= 1
if q == username and passward == userpassword:
print('登录成功')
break print('登录成功')
elif q != username: break
print('帐号错误') elif q != username:
continue print('帐号错误')
continue
else:
print('密码错误')
print('登录失败')
else: else:
print('密码错误') print('账号被锁定,请到我司解锁!')
print('登录失败') exit()
print('欢迎来到贝尔机器人!') 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