Commit c50df2cb by BellCodeEditor

save project

parent b810c294
Showing with 20 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
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