Commit 915c813a by BellCodeEditor

save project

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