-
Notifications
You must be signed in to change notification settings - Fork 0
Basic equations
lpereyrasantiago edited this page Oct 5, 2018
·
3 revisions
In the context of khwarizmi we call basic equations to those equations of the form nx = a + b + c ... + z
. Id est those equations that contain one unique variable (x in this case) equalized to a set of operations.
To operate with basic equations, we must create instances of the Equation class. Like so:
my_equation = Equation('2x - 5 = 10 - 3x + 1425')
Now that we have an Equation object, we can work with it.
There are several statements we can use to access our equation's data and perform operations with it. This is a list of some of them.
- inc_side : returns only the incognito side of this equation.
- sol_side : returns only the solution side of this equation.
- incognito : returns the unknown value of this equation.
- sort_equation() : returns the equation sorted to be solved.
- solve(bool: show) : returns the solution of the equation. If argument show is True, prints the steps taken to solve the equation (simplifying, sorting, solving).