2017-08-21Python作业

时间:2017-08-22 00:04:35   收藏:0   阅读:264

编写一个登陆接口:

账户密码输入

认证成功后显示欢迎信息

输错3次后锁定

_username = 101645
_password = 101645
for i in range(100):
    username = int(input("username:"))
    password = int(input("password:"))
    if username == _username and password == _password:
        print("Wlcome to system")
        break
    if username != _username and password != _password:
        print("The users and password is error")
        if i == 2:
            print("the system is locking")
            break


原文:http://13717089481.blog.51cto.com/13168879/1958198

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!