Skip to main content

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

  1. python3 -m venv .venv
  2. source .venv/bin/activate
  3. pip3 install -r requirements-dev.txt
  4. pip install -e src/
  5. pre-commit install

Leave virtual environment (when done)

  1. deactivate

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

math-problem-generator-0.0.3.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

math_problem_generator-0.0.3-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

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

Hashes for math-problem-generator-0.0.3.tar.gz
Algorithm Hash digest
SHA256 33b9f0dbef45dd255d0012b2f175f8bd4adb87da6e0b8db31cb0fd34f46a05ab
MD5 62e401747cb857c89a4ed09ef96827ab
BLAKE2b-256 3b965684fd2b5b9c3269c82ee8b5e37ceb3b0c78d487063d129a1dc5f45cc2f8

See more details on using hashes here.

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

Hashes for math_problem_generator-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 91849f83ea966963d77ecec72568ce04e0936746d9372296e2244405d843a0ad
MD5 a565e61fd96c10910f92438dcb7bd82a
BLAKE2b-256 4cd52fe9e90d3b75a2ce4f5e46088127277034cf89cfe49a29732e6a96b708c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page