简单的登陆程序001




for i in range(10):
if i< 3:
user_name=int(input("请输入用户名:"))
pass_word=int(input(" 请输入密码:"))
theuser_file = open("123","r")
username=int(theuser_file.readline())#文件第一行123,第二行456
password=int(theuser_file.readline())
theuser_file.close()
if user_name==username and pass_word==password:
print("欢迎用户%s登陆"%username)
break

else:
print("用户名或密码错误")
else:
print("此用户已被锁定请与管理员联系")
file_l=open("123","a+")
file_l.write("99072")
file_l.close()
break
 

 

 
posted @ 2016-11-25 20:57  200六  阅读(184)  评论(0编辑  收藏  举报