Python Foundations · Unit 2
Unit 2: Control Flow
Make decisions with if statements and repeat work with loops.
Lessons
- Understanding Control FlowWhat control flow means, sequential execution, conditional execution, repetition
- Comparison & Logical OperatorsComparison operators, boolean results, logical operators, complex conditions
- The if StatementWhat an if statement is, how to write if statements, when code runs, proper indentation
- if-else and elifThe else clause, the elif clause, when each block runs, practical examples
- Nested ConditionalsWhat nested conditionals are, why nesting is useful, how indentation works
- Boolean Logic in PracticeCombining operators, real-world examples, simplifying conditions, common patterns
- Introduction to LoopsWhat loops are, why loops are useful, types of loops, when to use loops
- The while LoopWhat a while loop is, how while loops work, using counters, preventing infinite loops
- The for LoopWhat a for loop is, using range(), iterating through strings, iterating through lists
- Loop Control StatementsWhat break does, what continue does, what pass does, when to use each
- Practical Control Flow ExamplesCombining concepts, building real programs, problem-solving approach
-
Take the Unit 2 test
End of unit test
Ten multiple choice questions worth 7 points each and one free response problem worth 30, so 100 in total. Score 70 or more to finish Unit 2 and unlock Unit 3.