action in the indented block following the test if the conditional test evaluates to truepython executes the code following the if statement if the test evaluates to falsepython ignores the code following the if statement let' say we have variable representing person' ageand we want to know if that person is old enough to vote the following code tests whether the person can votevoting py age if age > print("you are old enough to vote!"at python checks to see whether the value in age is greater than or equal to it isso python executes the indented print statement at vyou are old enough to voteindentation plays the same role in if statements as it did in for loops all indented lines after an if statement will be executed if the test passesand the entire block of indented lines will be ignored if the test does not pass you can have as many lines of code as you want in the block following the if statement let' add another line of output if the person is old enough to voteasking if the individual has registered to vote yetage if age > print("you are old enough to vote!"print("have you registered to vote yet?"the conditional test passesand both print statements are indentedso both lines are printedyou are old enough to votehave you registered to vote yetif the value of age is less than this program would produce no output if-else statements oftenyou'll want to take one action when conditional test passes and different action in all other cases python' ifelse syntax makes this possible an ifelse block is similar to simple if statementbut the else statement allows you to define an action or set of actions that are executed when the conditional test fails if statements