Commit 83c33e04 by BellCodeEditor

auto save

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