Commit 83c33e04 by BellCodeEditor

auto save

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