Commit 83c33e04 by BellCodeEditor

auto save

parent 29b4dbd1
Showing with 20 additions and 10 deletions
username = "python"
userpassword = "123456"
i = 3
while True:
name = input("输入账号:")
password = input("输入密码:")
if i>0:
name = input("输入账号:")
password = input("输入密码:")
if name == username and password == userpassword:
print("登入成功!")
break
if name != username:
print("账号错误!")
else:
i -= 1
if name == username and password == userpassword:
print("登入成功!")
break
if name != username:
print("账号错误!")
print("还剩",i,"次!")
continue
if not password == userpassword:
print("密码错误!")
print("登入失败!")
\ No newline at end of file
print("还剩",i,"次!")
print("登入失败!")
else:
print("次数用完!")
exit()
\ 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