Commit 94868752 by BellCodeEditor

save project

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