Close

Initial Progress

A project log for MathSolver

A program written entirely in Python to solve mathematical problems with step-by-step solutions.

jasmeet-brarJasmeet Brar 05/01/2016 at 02:350 Comments

I first started off by creating four files: gui.py, translator.py, definitions.py, and solver.py.

These four files won't be the only files in this program. I plan to add a script that is dedicated in creating the explanations for the step-by-step solutions, storing each step as it is created, and help project that onto the GUI.

As for the actual progress in this project, I have defined classes for variables, constants, and expressions, so that I can define specific operations that can be done to each of these objects in various cases. I did define a few functions in the expression class that will gather like terms, and simplify the expression by step. As of currently, it requires some debugging, since I recently implemented the "constant" class, since initially I was handling constants as strings in my expression, but then I realized that defining operations for them would be all over the place.

This constant class will handle all operations with numbers itself, and it's being used as a parameter for the coefficient and degree for the variable class itself. (It's named "var".) The var class can only handle simple terms, which can only have one letter being raised to a power, but it can't handle having multiple variables, all being raised to different powers. I do plan to fix that, by perhaps creating a new class similar to the variable class that will store all of its letters, and every power associated with each one of them.

I did define a function in translator.py called "translate_input", which will translate the user's input into a form that uses the classes in definitions.py, such as var and constant, and to be able to be used by other classes, such as the expression class as previously mentioned.

I currently have made quite a bit of progress, and I hope I can continue to push forward, and reach a big milestone.

Discussions