P02: Control flow and logicΒΆ
Computer programs become very powerful once we can command their flow of execution. This is done via two primary control structures:
Conditionals (
if...elif...else) statements that allow the program execution to branch based on conditions that are met, andLoops (
forandwhile) that allow the program execution to repeat either a fixed number of times (forloops) or until some condition is met (whileloops).Overview of topics:
conditionals (
if,elif,else)comparison operators
logic operators
for loops
while loops