标签:python
作业:编写登陆接口
要求: 输入正确则显示欢迎信息,输入错误三次则锁定.
# Author:Bryce_Zhang
username = ‘1‘
password = ‘2‘
count = 0
while count <4:
users = input("users:")
pass1 = input("pass:")
if users == username and pass1 == password:
print("登陆成功......")
break
else:
if count ==3:
print("您的账户已锁定!")
break
count +=1标签:python
原文地址:http://13717089481.blog.51cto.com/13168879/1952636