mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
afad67f7575759e94fe99fd08cc1f635962a56b7
* Create simplify_square_roots_generator * Adopt simplify_square_root to standards * lint fixes * lint fix * standardize line_equation_from_2_points * Fix some lint issues * Fix formatting/lint errors * update docs Co-authored-by: Hardik Gupta <96004638+typhoons01@users.noreply.github.com>
mathgenerator
A math problem generator, created for the purpose of giving teachers and students the means to easily get access to random math exercises to suit their needs.
To try out generators, go to https://mathgenerator-demo.netlify.app
See CONTRIBUTING.md for information about how to contribute.
Table of Contents
Installation
The project can be install via pip
pip install mathgenerator
Usage
Here is an example of how you would generate an addition problem:
import mathgenerator
#generate an addition problem
problem, solution = mathgenerator.addition()
#another way to generate an addition problem using genById()
problem, solution = mathgenerator.genById(0)
You may prefer to use import mathgenerator as mg and run functions like mg.addition() so that you don't have to type as much.
Problem/solution pairs are generated with either:
mathgenerator.<generator_name>()- generates a problem, solution set from the given generator name.mathgenerator.genById(id)- generates a problem, solution set with generator id provided by theidparameter
You can also use getGenList() to return a list of all generators included in the library in the format:
[funcname, subjectname]
Documentation
Documentation can be found at https://lukew3.github.io/mathgenerator
Languages
Python
99.6%
Makefile
0.3%