码迷,mamicode.com
首页 > 编程语言 > 详细

python第三天

时间:2017-08-13 21:16:09      阅读:159      评论:0      收藏:0      [点我收藏+]

标签:作业   log   and   sub   自己   har   while   name   put   

  其实都是很多天了,很抱歉对不起自己,不过都是在学习,顺便把自己写的代码附上去吧,下面写的是一个登陆界面的输入过程,很简陋,也当做是个作业吧,顺便也是放弃了sublime,选择了pycharm

_user="steven"
_password=str(123456)
count=0
while count<=2:
    user=input(‘name:‘)
    password=input(‘password:‘)
    if _user==user and _password==password:
        print(‘welcome  %s !‘%user)
        break
    else:
        print(‘name or password is worning‘)
        count+=1
        if count==3:
            wanted=input(‘还想玩吗?【y/n】\n‘)
            if wanted==‘y‘ or wanted==‘Y‘:
                count=0
if count==3:
    print(‘-------你他妈的傻逼吗?还在那尝试------‘)

  

python第三天

标签:作业   log   and   sub   自己   har   while   name   put   

原文地址:http://www.cnblogs.com/Joven-Ye/p/7354767.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!