control flow in this sectionwe review python' most fundamental control structuresconditional statements and loops common to all control structures is the syntax used in python for defining blocks of code the colon character is used to delimit the beginning of block of code that acts as body for control structure if the body can be stated as single executable statementit can technically placed on the same lineto the right of the colon howevera body is more typically typeset as an indented block starting on the line following the colon python relies on the indentation level to designate the extent of that block of codeor any nested blocks of code within the same principles will be applied when designating the body of function (see section )and the body of class (see section conditionals conditional constructs (also known as if statementsprovide way to execute chosen block of code based on the run-time evaluation of one or more boolean expressions in pythonthe most general form of conditional is written as followsif first conditionfirst body elif second conditionsecond body elif third conditionthird body elsefourth body each condition is boolean expressionand each body contains one or more commands that are to be executed conditionally if the first condition succeedsthe first body will be executedno other conditions or bodies are evaluated in that case if the first condition failsthen the process continues in similar manner with the evaluation of the second condition the execution of this overall construct will cause precisely one of the bodies to be executed there may be any number of elif clauses (including zero)and the final else clause is optional as described on page nonboolean types may be evaluated as booleans with intuitive meanings for exampleif response is string that was entered by userand we want to condition behavior on this being nonempty stringwe may write if responseas shorthand for the equivalentif response !