首页
Python
Java
IOS
Andorid
NodeJS
JavaScript
HTML5
【
2017-12-15python全栈9期第二天第一节之昨日内容回顾
】的更多相关文章
2017-12-15python全栈9期第二天第一节之昨日内容回顾
…
2017-12-20python全栈9期第五天第一节之昨日内容回顾和作业讲解之字母变大写
#!/user/bin/python# -*- coding:utf-8 -*-lis = [2,3,'k',['qwe',20,['k1',['tt','3','1']],89],'ab','adv']#tt变成大写.lis[3][2][1][0] = 'TT'print(lis)lis[3][2][1][0] = lis[3][2][1][0].upper()print(lis)…
2017-12-19python全栈9期第四天第一节之昨日内容回顾与作业讲解之插入insert和extend
#!/user/bin/python# -*- coding:utf-8 -*-li = ['zs','ls','ww','zl']li.insert(4,'cc')print(li)li.extend('pl')li.extend([1,3,4,5])print(li)print(li)…
2017-12-15python全栈9期第二天第七节之练习题
#!/user/bin/python# -*- coding:utf-8 -*-print(6 or 2 > 1)print(3 or 2 >1 )print(0 or 5 <4)print(5 <4 or 3)print(2 > 1 or 6)print(3 and 2 >1 )print(0 and 3 > 1)print(2 > 1 and 3)print(3 >1 and 0)…
2017-12-15python全栈9期第二天第七节之布尔值转数字
#!/user/bin/python# -*- coding:utf-8 -*-print(int(True))print(int(False))…
2017-12-15python全栈9期第二天第七节之数字转换成布尔值
#!/user/bin/python# -*- coding:utf-8 -*-print(bool(2))…
2017-12-15python全栈9期第二天第七节之x or y ,x 为 非 0时,则返回x
#!/user/bin/python# -*- coding:utf-8 -*-# x or y ,x 为 非 0时,则返回xprint(1 or 2)print(3 or 2)print(0 or 100)…
2017-12-15python全栈9期第二天第七节之运算符
#!/user/bin/python# -*- coding:utf-8 -*-print(3>4 or 4<3 and 1==1)print(1<2 and 3 <4 or 1 > 2)…
2017-12-15python全栈9期第二天第七节之整除
#!/user/bin/python# -*- coding:utf-8 -*-a = 10b = 20print(a // b)print(b // a)…
2017-12-15python全栈9期第二天第六节之三次登陆机会升级版再试试
#!/user/bin/python# -*- coding:utf-8 -*-#当剩余为0次机会时.询问用户是否再试试.如果同意那就再给三次机会.可一直继续username = 'zd'password = '123'i = 0while i < 3 : name = input('用户名:') pwd = input('密码:') if username == name and password == pwd : print('登陆成功') break else: print('登陆失败,还…