Files
mathgenerator/README.md
Luke Weiler a2d2a1b0e9 No Generator class (#405)
* Create ids list

* rm Genimprt, rm inst in algebra + basic_math

* computer science and calculus no inst

* Remove instances from geometry

* remove instances from misc

* remove instances from permutations

* fix under indentations

* improve binary_complement_1s

* Remove generator.py

* initial docs setup

* move modules out of funcs, regen docs

* Move subjects to single files

* pdoc docs

* add make docs

* Remove mid-file imports, delete templates

* lint fixes

* Use math in docs

* remove format string from complex_quad

* regen docs

* Lint fix

* Hide non-generator modules from docs

* Hide utility methods from docs

* Created _gen_list.py

* Remove docs from readme

* replace tabs with 4 spaces

* lint fixes

* little docs changes

* docstrings for half of subjects

* Added example docs for remaining generators

* update docs

* Update intersection of two lines #408

* Snake case variables; for #406

* update docs

* Remove escaped backslashes; for #407

* autopep8

* lint fix

* lint fix

* remove gcd duplicates; for  #401

* Add missing delimiter for fraction_multiplication

* rebuild docs
2022-12-27 14:31:58 -05:00

2.6 KiB

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://lukew3.github.io/mathgenerator

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 the id parameter

You can also use getGenList() to return a list of all generators included in the library in the format:

[id, title, gen_func, funcname, subjectname, kwargs]

Documentation

Documentation can be found at https://lukew3.github.io/mathgenerator