Commit 7487b755 by BellCodeEditor

save project

parent 1bf4da97
Showing with 22 additions and 0 deletions
import sys
username = "1111"
userpassword = "asdfghjkl"
times = 5
name = ""
password = ""
while True:
if times > 0:
name = input("用户名:")
password = input("密码:")
times -= 1
if name == username and password == userpassword:
print("登陆成功")
break
else:
if name != username:
print("用户名错误")
else:
print("次数用完,请联系柜台")
sys.exit(-1) #也可以用break
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