Commit a3f4bc86 by BellCodeEditor

save project

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