Bridge Academy.
← BACK TO MATERIALS
WEEK 43 · SEPTEMBER 17, 2026

Data Iteration · Part 5

Guarded while loops; Collatz, Newton sqrt, streaks, Fibonacci-over-limit; flag-based termination.

Lesson 17 · Data Iteration · Part 5 — Level II · Guide

September 17, 2026 · Bridge Academy Python Program

Learning goals

  • Write guarded while loops that verify progress each iteration.
  • Use sentinel values and flag variables to stop cleanly.
  • Combine break, continue, and compound conditions (and/or).
  • Convert a for loop to an equivalent while when state must evolve non-linearly.

This lesson covers PCEP-30-02 objective 2.2.

Preview truncated — download the notebook to see the full lesson.