Commit 37cb03b8 by BellCodeEditor

auto save

parent 9dce5a6b
Showing with 48 additions and 0 deletions
name1="光头强"
key1=12345
name2="熊大"
key2=54188
name3="熊二"
key3=14588
life=3
while True:
print("*"*50)
selfname=input("请输入用户名:")
selfkey=input("请输入密码:")
print("*"*50)
life=life-1
if selfname == name1:
if selfkey == str(key1):
print("登录成功!")
print("*"*50)
exit()
else:
print("密码错误!")
print("您还剩"+str(life)+"次机会!")
elif selfname == name2:
if selfkey == str(key2):
print("登录成功!")
print("*"*50)
exit()
else:
print("密码错误!")
print("您还剩"+str(life)+"次机会!")
elif selfname == name3:
if selfkey == str(key3):
print("登录成功!")
print("*"*50)
exit()
else:
print("密码错误!")
print("您还剩"+str(life)+"次机会!")
print("*"*50)
else:
if life==0:
print("您已登录失败3次!账号已冻结!")
print("*"*50)
exit()
else:
print("登陆失败,没有此账号!请重新输入!")
print("您还剩"+str(life)+"次机会!")
print("*"*50)
\ 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