conditional execution logical operators there are three logical operatorsandorand not the semantics (meaningof these operators is similar to their meaning in english for examplex and is true only if is greater than and less than % = or % = is true if either of the conditions is truethat isif the number is divisible by or finallythe not operator negates boolean expressionso not ( yis true if is falsethat isif is less than or equal to strictly speakingthe operands of the logical operators should be boolean expressionsbut python is not very strict any nonzero number is interpreted as "true and true true this flexibility can be usefulbut there are some subtleties to it that might be confusing you might want to avoid it until you are sure you know what you are doing conditional execution in order to write useful programswe almost always need the ability to check conditions and change the behavior of the program accordingly conditional statements give us this ability the simplest form is the if statementif print(' is positive'the boolean expression after the if statement is called the condition we end the if statement with colon character (:and the line(safter the if statement are indented yes > print(' is postitive'figure if logic