Commit 861acf87 by BellCodeEditor

auto save

parent b810c294
Showing with 21 additions and 0 deletions
username = "python"
userpassword = "123456"
i = 3
while True:
if i < 1:
print("次数用完,登陆失败")
break
name = input("请输入用户名:")
password = input("请输入密码:")
if username != name:
print("账号错误")
print("还剩"+str(i - 1) +"次机会")
elif password != userpassword:
print("密码错误")
print("还剩"+str(i - 1) +"次机会")
else:
print("登录成功!")
print("欢迎来到贝尔编程!")
break
i -= 1
\ 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