题目要求
作答
源代码
#!/usr/bin/env python
#encoding=utf-8
'''
@author:Ningdaxing
@file:testhomework.py
@Createtime:6/25/17 8:41 PM
'''
USERNAME = "Ningdaxing"
PASSWORD = "redhat"
for i in range(1,4,1):
test_username = raw_input('Please input your username:')
test_password = raw_input('Please input your password:')
if test_password==PASSWORD and test_username==USERNAME:
print "welcome to user manage system"
exit(0)
else:
print "请输入正确的用户名和密码."
print "你已经登陆三次,请10min后再登陆"