#!/user/bin/python# -*- coding:utf-8 -*-print(int(True))print(int(False))

2017-12-15python全栈9期第二天第七节之布尔值转数字的更多相关文章

  1. 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)p ...

  2. 2017-12-15python全栈9期第二天第七节之数字转换成布尔值

    #!/user/bin/python# -*- coding:utf-8 -*-print(bool(2))

  3. 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 ...

  4. 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 ...

  5. 2017-12-15python全栈9期第二天第七节之整除

    #!/user/bin/python# -*- coding:utf-8 -*-a = 10b = 20print(a // b)print(b // a)

  6. 2017-12-15python全栈9期第二天第六节之三次登陆机会升级版再试试

    #!/user/bin/python# -*- coding:utf-8 -*-#当剩余为0次机会时.询问用户是否再试试.如果同意那就再给三次机会.可一直继续username = 'zd'passwo ...

  7. 2017-12-15python全栈9期第二天第五节之while else的用法二当不被break打断时else内容的结果会被打印

    #!/user/bin/python# -*- coding:utf-8 -*-count = 0while count <=5 : count += 1 if count == 3 : pas ...

  8. 2017-12-15python全栈9期第二天第五节之while else的用法一当被break打断时else内容的结果不会被打印

    #!/user/bin/python# -*- coding:utf-8 -*-count = 0while count <5 : count += 1 if count == 3 : brea ...

  9. 2017-12-15python全栈9期第二天第五节之格式化输出补充之想要在格式化输出中表示单纯的%号就加%

    #!/user/bin/python# -*- coding:utf-8 -*-name = input('姓名:')age = input('年龄:')height = input('身高:')ms ...

随机推荐

  1. iOS的非常全的三方库,插件,大牛博客

    转自: http://www.cnblogs.com/zyjzyj/p/6015625.html github排名:https://github.com/trending, github搜索:http ...

  2. 重写Distinct

    添加类并继承`IEqualityComparer`,重写方法 public class DistinctComparer : IEqualityComparer<ActionInfo> { ...

  3. CH2601 电路维修(算竞进阶习题)

    01边bfs 这题很容易想到的就是根据符号的情况建图,把每个点方格的对角线看成图的节点,有线相连就是边权就是0,没有就是1 然后跑最短路,但是最短路用的优先队列维护是有logn的代价的 这题还有一个更 ...

  4. yoj维护

    维护 启动容器 docker start yoj 暂停容器 docker stop yoj 重启容器 docker restart yoj 进入容器的终端 docker attach yok 保存容器 ...

  5. bzoj 2957 楼房重建 (线段树+思路)

    链接: https://www.lydsy.com/JudgeOnline/problem.php?id=2957 思路: 用分块可以很简单的过掉,但是这道题也可以用线段树写. 分类讨论左区间最大值对 ...

  6. vscode跳转到函数定义处

    需要安装对应语言的插件,帮助-欢迎使用,安装javascript, php php还需要安装php7, 到官网https://windows.php.net/download#php-7.2 下载解压 ...

  7. 【HDU 6171】Admiral(搜索+剪枝)

    多校10 1001 HDU 6171 Admiral 题意 目标状态是第i行有i+1个i数字(i=0-5)共6行.给你初始状态,数字0可以交换上一行最近的两个和下一行最近的两个.求20步以内到目标状态 ...

  8. sshfs && tailon

    sshfs 安装yum install glib2-devel fuse-sshfs官方版本地址https://github.com/libfuse/sshfs/releases目前最新版本:wget ...

  9. vue路由原理剖析

    单页面应用(SPA)的核心之一是: 更新视图而不重新请求页面, 实现这一点主要是两种方式: 1.Hash: 通过改变hash值 2.History: 利用history对象新特性(详情可出门左拐见:  ...

  10. Jupyter-Notebook服务器自定义密码

    往期回顾 Anaconda安装:https://www.cnblogs.com/dotnetcrazy/p/9158715.html 基本知识导航篇:https://www.cnblogs.com/d ...