# math-exercise: Make mathematics something students can try

Add questions to your Quarto notes that students can answer and check immediately. Use a missing value, an algebraic expression, a vector, a matrix or a construction on a diagram. Optional AI feedback can help students decide what to try next.

[Try a mathematics activity](https://erasmus-ctm.github.io/math-exercise/) · [Authoring guide](docs/authoring.md)

[Explore the full mathematics collection](https://erasmus-ctm.github.io/math-exercise/).

## Try it, then make it yours

Start with a short equation, then explore the larger collection for ideas from algebra, calculus and geometry. Each example has source you can open and adapt.

Choose the idea you want students to practise and write a short question. Specify an expected answer, try a few alternative answers, and make sure the question says whether a particular form is required.

## Ideas for your teaching

- Accept equivalent expressions when the method matters more than notation.
- Ask for a factored or expanded form when that is the learning goal.
- Build a calculation in several small steps.
- Let students move points and construct answers on a graph.

## Choose the kind of help

A useful hint leaves the student something to do. You can ask for one question,
a short explanation, or a review focused on a particular skill. The same task
can offer different help at different stages of learning.

**Feedback** can prepare a message to paste into an AI chat you already use.
If your course has an AI service set up, it can show the reply on the exercise
page. AI advice is for discussion and revision; it does not replace your
judgment or the exercise's checks.

## Open an example in your editor

[Example source — download and open in your editor](https://github.com/Erasmus-CTM/math-exercise/blob/main/example.qmd).

On GitHub, choose **Download raw file**, then open the saved `.qmd` in your
editor—for example, **VS Code**. The link above is editable Quarto source; use
the example link at the top of this README to try the rendered page.

## Take the next step

- [Adapt your first activity](docs/authoring.md)
- [Install and configure the extension](docs/installation.md)
- [Look up a specific option](docs/reference.md)

These guides assume you can edit and render a Quarto document. The authoring
guide starts with the teaching task; setup details are kept separately.

## License

AGPL-3.0-or-later. See [LICENSE](LICENSE).

Developed by the **CTM team** for the Erasmus+ project
**“Computational Thinking makes sense of Mathematics”**
(**2023-1-NO01-KA220-HED-000166744**).
[Funding and acknowledgements](docs/acknowledgements.md).

## Generated variants

Author one template instead of repeated pools. See [build-time generation and optional review](docs/build-time-variants.md) and [the examples](generated-variants.qmd). Generated templates require Python 3 and PyYAML at build time.
# Standalone Python worker

Mathematics checkers and custom checkers use the page's shared `CTMWorker`.
Logical operations are serialized with other Python consumers on that page;
the check's stop-after clock starts when it acquires the interpreter. Stop
cancels queued checks and interrupts active work, with a bounded worker restart
when isolation is unavailable or the interrupt is ignored. Cancelled work is
never replayed and does not overwrite a completed grade.
