Commit 4ecdc93e by BellCodeEditor

save project

parent de2be9fd
Showing with 21 additions and 8 deletions
i=3
zh= "python" # 保存在服务器数据库中的用户账号(正确的账号) zh= "python" # 保存在服务器数据库中的用户账号(正确的账号)
mm= "123456" # 保存在服务器数据库中的用户密码(正确的密码) mm= "123456" # 保存在服务器数据库中的用户密码(正确的密码)
zh1=input("请输入您的账号") while True:
# 请用input()实现用户输入账号、密码的功能 if i>0:
mm1=input("请输入您的密码") zh1=input("请输入您的账号")
if zh=zh1 and mm=mm1: mm1=input("请输入您的密码")
i-=1
else: if zh==zh1 and mm==mm1:
input("登陆成功") print("登陆成功")
break
if zh!=zh1:
print("账号错误,请重新输入!")
print("脑残,你只剩"+str(i)+"次机会了")
continue
if mm!=mm1:
print("密码错误,请重新输入!")
print("脑残,你只剩"+str(i)+"次机会了")
else:
print("你的账号已被封印")
exit()
print("欢迎来到编程世界")
# 如果用户输入的账号、密码正确,提示登陆成功 # 如果用户输入的账号、密码正确,提示登陆成功
\ 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