choosing alternatives using the if else statement many of the decisions you make in an application fall into category of choosing one of two options based on conditions for examplewhen looking at signal lightyou choose one of two optionspress on the brake to stop or press the accelerator to continue the option you choose depends on the conditions green light signals that you can continue on through the lighta red light tells you to stop the following sections describe how python makes it possible to choose between two alternatives understanding the if else statement with pythonyou choose one of two alternatives using the else clause of the if statement clause is an addition to code block that modifies the way in which it works most code blocks support multiple clauses in this casethe else clause enables you to perform an alternative taskwhich increases the usefulness of the if statement most developers refer to the form of the if statement that has the else clause included as the if else statementwith the ellipsis implying that something happens between if and else sometimes developers encounter problems with the if else statement because they forget that the else clause always executes when the conditions for the if statement aren' met it' important to think about the consequences of always executing set of tasks when the conditions are false sometimes doing so can lead to unintended consequences using the if else statement in an application the simpleif py example is little less helpful than it could be when the user enters value that' outside the intended range even entering data of the wrong type produces an error messagebut entering the correct type of data outside the range tells the user nothing in this exampleyou discover the means for correcting this problem by using an else clause the following steps demonstrate just one reason to provide an alternative action when the condition for an if statement is false this example also appears with the downloadable source code as ifelse py