Code Monkey home page Code Monkey logo

algebraproblemgenerator's Introduction

Algebra generator that can easily create algebra equations in the Ax + b = C format. It can also solve equations in Ax + b = C. Right now, only the operations, '-' and '+' are supported

Getting Started

You can install the module via pip:

pip install algebraMathGenerator

You can also clone the github like this:

git clone https://github.com/Megabrains44/AlgebraProblemGenerator.git

Examples

The following is an example of how to create a algebra math equation. The algebraMathGenerator.generateAlgebraEquation() will return a class, so you can get the equation by adding a .equation after it.

import algebraMathGenerator

equationClass = algebraMathGenerator.generateAlgebraEquation(operation = "+")
print(equationClass.equation) # returns equation 

You can solve equations with algebraMathGenerator.solveAlgebraEquation(equation : class). The equation variable should be a class returned from algebraMathGenerator.generateAlgebraEquation()

import algebraMathGenerator

equationClass = algebraMathGenerator.generateAlgebraEquation(operation = "+")
answer = algebraMathGenerator.solveAlgebraEquation(equationClass)
print(equationClass.equation) # returns an equation
print(answer) # returns the answer to the equation above

You can even loop through the generate method to produce a bunch of equations and their answers!

Documentation

Class algebraMathGenerator

2 functions

Function: .generateAlgebraEquation(operation : str)

  • .equation - returns the equation Example: 2x + 4 = 6

  • .variable - returns the variable Example: x

  • .operation - returns the operation done Example: +

  • .equalsTo - returns the number the equation is equal to. Example: 6

  • .coeffecient - returns the number mutiplied by the variable Example: 2

  • .constant - returns the constant term in the equation. Example: 4

Returns class object

Function: .solveAlgebraEquation(equation : algebraMathGenerator.generateAlgebraEquation())

Input should be of type .generateAlgebraEquation()

Returns float value

algebraproblemgenerator's People

Contributors

megabrains44 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.