This applicaiton takes an expression as a string and solves it.
It is capable of handling parenthesis, exponentiation, multiplicaiton, division, addition and subtraction. The program also recognizes when a number outside of the parenthesis is touching the parenthesis, noting that this indicates multiplicaiton. All results return in whole numbers, rounded.
Parenthesis "(" and ")".
Exponentiation "^". ie: 2^2 is 2 to the power of 2.
Multiplication "*".
Division "/".
Addition "+".
Subtraction "-".
-e, --expr <expression>
Expression as string. ie: (4+1)(5^2)/2
--logFile <logging file>
(Optional) File to output log to. ie: "log.log". Default is "expressionSolver.log".
--logLevel <loglevel>
(Optional) Logging level. ie: "WARN", "INFO", "DEBUG"
python expressionSolver.py --expr "(1 * 4) + (5 * 2)" --logFile log.log --logLevel WARN
(1 * 4) + (5 * 2) = 14
python expressionSolver.py --expr "4^3(9 / 1)"
4^3(9 / 1) = 576