2026-spring python-basics/lessons/04-loops-that-do-the-work

README.md

Lesson 4: Loops that do the work

In this lesson you'll work through loops that do the work step by step, with short exercises after each idea.

Full lesson: https://glibcode.net/courses/python-basics/lessons/4

Files

  • loops.py: for and while loops over a shopping list

Tip: Use a virtual environment per project: python3 -m venv .venv.

Run it

python3 loops.py

Exercises

See exercises.md. Ask in the forum once you've tried.