A deterministic math worksheet generator for teachers, tutors, and students. It creates printable practice sets, answer keys, and JSON exports from a simple CLI.
- Generates addition, subtraction, multiplication, division, fraction, linear-equation, or mixed worksheets.
- Uses deterministic seeds so the same command always reproduces the same worksheet.
- Produces both student-facing worksheets and answer keys.
- Exports machine-readable JSON for future web apps, dashboards, or content pipelines.
- Runs with the Python standard library only.
python3 -m math_gen --topic mixed --count 20 --grade 6 --seed 42 --output artifactsGenerated files:
artifacts/worksheet.mdartifacts/answer_key.mdartifacts/worksheet.json
python3 -m math_gen --topic fractions --count 12 --grade 5 --seed 100 --output artifacts/fractions
python3 -m math_gen --topic linear --count 15 --grade 7 --seed 321 --output artifacts/linearmath_gen/
generator.py # problem generation, rendering, and file outputs
__main__.py # CLI entrypoint
tests/
test_generator.py
python3 -m unittest discover -s testsThe project intentionally avoids API keys, databases, and web-server setup so the generator remains fast, reproducible, and easy to inspect.