Commit 6cf1cd6d by BellCodeEditor

save project

parent 2e20a248
Showing with 14 additions and 8 deletions
i=3
username = "python" # 保存在服务器数据库中的用户账号(正确的账号) username = "python" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "123456" userpassword = "123456"
while True: # 保存在服务器数据库中的用户密码(正确的密码) while True: # 保存在服务器数据库中的用户密码(正确的密码)
mame=input("请输入账号:") mame=input("请输入账号:")
password=input("请输入密码:") password=input("请输入密码:")
if mame==username and password==userpassword: if i>0:
print("登录成功") if mame==username and password==userpassword:
break print("登录成功")
if mame!=username: break
print("用户账号错误,请重新输入!") i=i-1
continue if mame!=username:
if password!=userpassword: print("用户账号错误,请重新输入!")
print("用户密码错误,请重新输入!") continue
if password!=userpassword:
print("用户密码错误,请重新输入!")
else:
print("登录次数已用完")
eixt()
print("欢迎来到贝尔编程") print("欢迎来到贝尔编程")
# 请用input()实现用户输入账号、密码的功能 # 请用input()实现用户输入账号、密码的功能
......
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