program structure and control flow his covers the details of program structure and control flow topics include conditionalsiterationexceptionsand context managers program structure and execution python programs are structured as sequence of statements all language featuresincluding variable assignmentfunction definitionsclassesand module importsare statements that have equal status with all other statements in factthere are no "specialstatementsand every statement can be placed anywhere in program for examplethis code defines two different versions of functionif debugdef square( )if not isinstance( ,float)raise typeerror("expected float"return elsedef square( )return when loading source filesthe interpreter always executes every statement in order until there are no more statements to execute this execution model applies both to files you simply run as the main program and to library files that are loaded via import conditional execution the ifelseand elif statements control conditional code execution the general format of conditional statement is as followsif expressionstatements elif expressionstatements elif expressionstatements elsestatements lib fl ff