A package for generating math problems
Project description
Python package math_problem_generator
A python package for generating simple math problems. The package is only for generating the problems. There is no support for presentation or user interaction.
Examples
How to use the package.
# Import the package
from math_problem_generator import generator
# Generate 2 simple addition problems with
# 4 numbers between 1 and 10 to be added
p = generator.simple_problems(
"add",no_of_problems=2,min_number=1,max_number=10,numbers=4
)
# Print the math problems
print(p)
The code above should print something like this:
[
{'type': 'simple', 'operator': 'add', 'numbers': [5, 2, 3, 6], 'solution': 16, 'users_answer': None},
{'type': 'simple', 'operator': 'add', 'numbers': [6, 10, 10, 5], 'solution': 31, 'users_answer': None}]
]
Development
Setup virtual environment
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements-dev.txt
pip install -e src/
pre-commit install
Leave virtual environment (when done)
deactivate
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for math-problem-generator-0.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33b9f0dbef45dd255d0012b2f175f8bd4adb87da6e0b8db31cb0fd34f46a05ab |
|
MD5 | 62e401747cb857c89a4ed09ef96827ab |
|
BLAKE2b-256 | 3b965684fd2b5b9c3269c82ee8b5e37ceb3b0c78d487063d129a1dc5f45cc2f8 |
Close
Hashes for math_problem_generator-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91849f83ea966963d77ecec72568ce04e0936746d9372296e2244405d843a0ad |
|
MD5 | a565e61fd96c10910f92438dcb7bd82a |
|
BLAKE2b-256 | 4cd52fe9e90d3b75a2ce4f5e46088127277034cf89cfe49a29732e6a96b708c6 |