da59c4e64d2cb9d0c293af24efbd11dc63aa21a4
math-problems-structure
This repository provides a Python library for generating structured math problems, ranging from graphical exercises to text-based ones.
Installation
This project uses uv for dependency management. To set up the environment, run the following command in your terminal:
uv sync
Usage
Import and call the problem generator functions directly:
from math_problems_structure.grade_1 import join_pictures_with_quantity
problem = join_pictures_with_quantity(
available_pictures=[
{"id": f"picture-{index}", "name": f"Picture {index}", "image_path": f"/images/{index}.png"}
for index in range(10)
],
seed=1,
)
You can also run the included example script:
uv run python test.py
Each grade has its images_for_reference folder, which contains the images that were used to create the structure of the problems.
Test
To run the tests, use the following command:
uv run python -m unittest
Description
This repository provides functions for generating all types of math problems, ranging from graphical exercises to text-based ones.
Languages
Python
100%