Python, Boolean - Conditionals & Control Flow - Not understanding -
i cant seem grasp bootlean operators. i'm using example code academy. @ first read wrong , putting true or not false , false instead of true or false.
can explain bit more me can more of understanding.
assign true or false appropriate bool_one through bool_five. set bool_one equal result of false or not true , true set bool_two equal result of false , not true or true set bool_three equal result of true , not (false or false) set bool_four equal result of not not true or false , not true set bool_five equal result of false or not (true , true)
you have 3 boolean operations , rules:
not, inverses (akanot true=>false,not false=>true)or, works on 2 operandsx or y, returnstrueif eithertrue,falseif bothfalseand, works on 2 operandsx , y, returnstrueif bothtrue,falseotherwise- they evaluated left right
nothas highest precedence,andafter that, lastlyor- you can use
()change precedence of operations, in everyday math
Comments
Post a Comment