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 .venvsource .venv/bin/activatepip3 install -r requirements-dev.txtpip 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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file math-problem-generator-0.0.3.tar.gz.
File metadata
- Download URL: math-problem-generator-0.0.3.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33b9f0dbef45dd255d0012b2f175f8bd4adb87da6e0b8db31cb0fd34f46a05ab
|
|
| MD5 |
62e401747cb857c89a4ed09ef96827ab
|
|
| BLAKE2b-256 |
3b965684fd2b5b9c3269c82ee8b5e37ceb3b0c78d487063d129a1dc5f45cc2f8
|
File details
Details for the file math_problem_generator-0.0.3-py3-none-any.whl.
File metadata
- Download URL: math_problem_generator-0.0.3-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91849f83ea966963d77ecec72568ce04e0936746d9372296e2244405d843a0ad
|
|
| MD5 |
a565e61fd96c10910f92438dcb7bd82a
|
|
| BLAKE2b-256 |
4cd52fe9e90d3b75a2ce4f5e46088127277034cf89cfe49a29732e6a96b708c6
|