day04_05 逻辑运算符表达式
Posted darkalex001
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了day04_05 逻辑运算符表达式相关的知识,希望对你有一定的参考价值。
num += 1 等价于 num = num + 1
逻辑运算符
and 全true则true
条件1 and 条件2
5>3 and 3>2 ===> true
5>3 and 3<2 ===>false
or 有true则true
5>3 or 6<2 ===>true
not 取反
not 5>3 ===>false
not 5<3 ===>true
a>b and c>d or not f
判断优先级:最好加括号
not > and > or
以上是关于day04_05 逻辑运算符表达式的主要内容,如果未能解决你的问题,请参考以下文章