Exercises

Exercises are small, focused practice tasks. They are shorter than labs and are typically completed inline inside a lesson without leaving the course website. Exercises may also live outside a course when they are useful across several courses.

Where exercises live

There are two valid locations, chosen to match how the exercise is used:

  1. Inside a lesson — the common case. courses/<course>/part-<n>/<NN>-<slug>/exercise.qmd is the lesson-scoped exercise. See the reference exercise in Pico · Part 1 · Introduction.
  2. Under exercises/<slug>/ — for reusable exercises that are referenced from more than one course, or that need starter files and a solution.

Convention

Every exercise has:

  • A short, testable Task section.
  • Explicit Success criteria the learner can self-check.
  • Optional Reflect or Hints callouts.
  • Optional Solution either inline (in a collapsed callout) or in a separate solution.qmd for exercises under exercises/<slug>/.

Exercises intentionally omit the full Objectives + Walkthrough + Solution split used by labs. That heavier structure belongs in labs.

Exercise directory layout

Reusable exercises use this minimal layout:

exercises/<slug>/
  index.qmd          # Task, success criteria, hints
  solution.qmd       # Optional: reference solution
  metadata.yaml      # Optional: machine-readable descriptor
  downloads/         # Optional: starter files

The metadata.yaml schema follows the same shape as labs, using id: oe.exercise.<slug>. The full field list is documented in the source repository under templates/README.qmd (in-repo scaffold, not published as a learner page).

Available exercise exemplars

  • Pico · First Rule — the reusable reference exercise that demonstrates the convention.

See also

  • Labs — larger, hands-on activities.
  • Courses — course sites that embed lesson-scoped exercises inline.