14. Python Chapter 3 — control statements - revision mindmap
All mindmaps · Full chapter · Practice answers

Open full-resolution image · Printable collection - page 14
The map is a completed revision summary. Cover a branch and reconstruct it, then try the linked chapter practice. Read the image at full size when labels are small.
Text version
Boolean decisions
- Translate strict versus inclusive comparison
- Parentheses and precedence
- if/elif/else: first matching branch
- Separate if statements can execute several branches
Loop choice
- for: traverse iterable or known range
- while: repeat while a condition holds
- range start/stop/step; excluded stop
- Zero iterations and final failed condition
Loop state
- Counters start at 0
- Sums start at 0; products at 1
- Flags record conditions
- Sentinels end processing; test before adding when excluded
Nested control flow
- Outer versus inner responsibility
- Row accumulator versus grand total
- break exits nearest loop; continue skips iteration
- return exits the function, including loops
Validation and termination
- Convert safely; catch expected exception
- Apply range after successful conversion
- Change controlling state or return on success
- Avoid hiding unrelated errors with broad exception handling
Worked example & exam traps
- Sum input 3, 5, -1 with sentinel -1 → total 8.
- Test sentinel before accumulation; first input -1 → total 0.
- Nested loops: reset row total inside outer loop, grand total outside.
- Avoid: wrong reset level; premature return; condition never changes
Sources and reading
This map condenses Chapter 14 and its source trail. Use the self-learning reading guide for the corresponding VJC pages and A notes. It does not add topics to the stated promo scope.