Commit a3f4bc86 by BellCodeEditor

save project

parent 74d24e7e
Showing with 13 additions and 8 deletions
username = "python" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "123456"
i=3
while True: # 保存在服务器数据库中的用户密码(正确的密码)
name=input("输入账号:")
fgdds=input("输入密码:")
if name!=username:
print("账号错误")
continue
if fgdds==userpassword:
print("密码错误")
if name==username and fgdds==userpassword:
if i>0:
name=input("输入账号:")
fgdds=input("输入密码:")
if name!=username:
print("账号错误")
continue
if fgdds==userpassword:
print("密码错误")
if name==username and fgdds==userpassword:
break
elif:
print("输入错误太多")
exit()
print("登陆成功")
# 请用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