Commit 9ed67038 by BellCodeEditor

save project

parent 4f5751f2
Showing with 13 additions and 12 deletions
i = 3
username="pythan" username="pythan"
userpassword="123456" userpassword="123456"
i=3
while True: while True:
if i>0:
name = input("输入账号:") name = input("输入账号:")
password = input("输入密码:") password = input("输入密码:")
i=i-1 i=i-1
if name == username and password == userpassword: if i<=0:
print("账号已锁定")
exit()
if name == usernamen and password==userpassword
print("登陆成功") print("登陆成功")
break break
elif name != username: if name!=username:
print("账号错误,请重试") print("账号错误")
else: print("错误,你还有"+str(i)+"机会")
password != userpassword if password!=userpassword:
print("密码错误") print("账号错误")
print("错误,你还有") print("错误,你还有"+str(i)+"机会")
print("账号已锁定,请继续来我院治疗") print("欢迎来到贝尔星球")
exit()
print("欢迎来到天水二院")
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