首页 > 编程语言 > 详细

Python学习作业之登陆接口_For

时间:2017-08-01 21:30:59      阅读:257      评论:0      收藏:0      [点我收藏+]

作业:编写登陆接口

要求: 输入正确则显示欢迎信息,输入错误三次则锁定.

# Author:Bryce_Zhang
username = "1"
password = "2"
for i in range(4):
    users = input("users:")
    pass1 = input("pass1:")
    if users == username and pass1 == password:
        print("账户密码正确登陆成功!")
        break
    else:
        if i == 3:
           print("您的账户已经锁定!")
           break
        i +=1


Python学习作业之登陆接口_For

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!