Commit 94868752 by BellCodeEditor

save project

parent f822f3cf
Showing with 22 additions and 9 deletions
zh = "python" # 保存在服务器数据库中的用户账号(正确的账号) zh = "python" # 保存在服务器数据库中的用户账号(正确的账号)
mm= "123456" # 保存在服务器数据库中的用户密码(正确的密码) mm= "123456"
zh1=input("请输入你的账号") i=3 # 保存在服务器数据库中的用户密码(正确的密码)
mm=input("请输入你的密码")# 请用input()实现用户输入账号、密码的功能 while True:
if zh1==zh and mm1==mm if i>0:
print(登陆成功) zh1=input("请输入你的账号")
else: mm1=input("请输入你的密码")# 请用input()实现用户输入账号、密码的功能
print(登陆失败) i-=1
# 如果用户输入的账号、密码正确,提示登陆成功 if zh1 !=zh:
\ No newline at end of file print("账号错误"+"你还有"+str(i)+"次机会")
print("请输入你的账号和密码")
continue
elif mm1!=mm:
print("密码错误"+"你还有"+str(i)+"次机会")
print("请输入你的账号和密码")
else:
print("登陆成功")
break
else:
print("没机会了,账号被锁")
exit()
\ No newline at end of file
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