Categories

Control Structures


  • Chapter 2.1: Conditionals – If, Else, Elif

    In this chapter, we will discuss how to control the flow of our Python programs using conditional statements: if, else, and elif. The if Statement The if statement is the…

  • Chapter 2.2: Loops – For and While

    Understanding and using loops (for, while) In Python, loops are used to repeatedly execute a block of program statements. The two types of loops in Python are the for loop…

  • Chapter 2.3: Controlling Loop Execution – Break, Continue

    Understanding and using break and continue within loops In programming, it’s often necessary to have more control over the flow of execution within loops. Python provides two keywords, break and…