Commit ab7a9858 by BellCodeEditor

save project

parent 7e0a712f
Showing with 7 additions and 0 deletions
username="python" username="python"
userpassword="123456" userpassword="123456"
i=3
while True: while True:
print("您还有"+str(i)+"次输入机会")
name=input("请输入账号:") name=input("请输入账号:")
password=input("请输入密码:") password=input("请输入密码:")
if i==0:
print("你的账户已被锁定,不能再登录")
break
if username==name and userpassword==password: if username==name and userpassword==password:
print("登陆成功") print("登陆成功")
print("欢迎来到贝尔编程") print("欢迎来到贝尔编程")
break break
elif name != username: elif name != username:
print("用户名不存在,请重新输入") print("用户名不存在,请重新输入")
i-=1
else: else:
if password !=userpassword: if password !=userpassword:
print("密码输入有误,请重新输入") print("密码输入有误,请重新输入")
i-=1
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