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:
- Inside a lesson — the common case.
courses/<course>/part-<n>/<NN>-<slug>/exercise.qmdis the lesson-scoped exercise. See the reference exercise in Pico · Part 1 · Introduction. - 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.qmdfor exercises underexercises/<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.