Skip to content

sameer2191/math-gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Math Gen

A deterministic math worksheet generator for teachers, tutors, and students. It creates printable practice sets, answer keys, and JSON exports from a simple CLI.

What It Does

  • 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.

Quick Start

python3 -m math_gen --topic mixed --count 20 --grade 6 --seed 42 --output artifacts

Generated files:

  • artifacts/worksheet.md
  • artifacts/answer_key.md
  • artifacts/worksheet.json

Examples

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/linear

Project Structure

math_gen/
  generator.py     # problem generation, rendering, and file outputs
  __main__.py      # CLI entrypoint
tests/
  test_generator.py

Development

python3 -m unittest discover -s tests

The project intentionally avoids API keys, databases, and web-server setup so the generator remains fast, reproducible, and easy to inspect.

About

Deterministic math worksheet generator with grade-aware topics, answer keys, JSON export, tests, and CI.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages