syntax if test expressionbody of if elsebody of else the if else statement evaluates test expression and will execute the body of if only when the test condition is true if the condition is falsethe body of else is executed indentation is used to separate the blocks example of if else program checks if the number is positive or negative and displays an appropriate message num try these two variations as well num - num if num > print ("positive or zero"elseprint ("negative number"outputpositive or zero in the above examplewhen num is equal to the test expression is true and the body of if is executed and the body of else is skipped if num is equal to - the test expression is false and the body of else is executed and the body of if is skipped if num is equal to the test expression is true and body of if is executed and body of else is skipped if elif else statementsyntax if test expressionbody of if elif test expressionbody of elif elsebody of else