Data Iteration · Part 1
for with range; countdowns; accumulator pattern; loop variable in f-strings.
Lesson 13 · Data Iteration · Part 1 — Level I · Guide
August 20, 2026 · Bridge Academy Python Program
Learning goals
- Write a
forloop usingrange(n)to repeat an action n times. - Use
range(start, stop)andrange(start, stop, step)for custom counts. - Count down with a negative step:
range(10, 0, -1). - Use the loop variable inside the loop body, including inside f-strings.
- Add numbers up with an accumulator variable that grows each pass.
- Feel the difference between the loop header and its indented body.
This lesson covers PCEP-30-02 objective 2.2.
Preview truncated — download the notebook to see the full lesson.