Chapter

Repeating and organizing work

<p>Repeat a task without copying lines, then give reusable operations names and parameters.</p>

Lessons

  1. Loops with for and while

    Repeat work over a sequence with for or while a condition remains true.

  2. Functions and parameters

    Define a function, pass it information, return a result, and keep repeated logic in one place.