A simple expression evaluator that evaluates a given expression.
Note
The scripts check for valid characters, like numbers or symbols.
Input: 10 + 2 * 6
Output: 22
Input: 100 x (2 + 12) / 14
Output: 100
Caution
Any expression wth an invalid character (like a letter or unhandled symbol) have an error of -1
returned.
Input: l0 + 2 * 6
Output: -1
Input: 100 * ((2 + 12)
Output: -1
This project cannot be used to commit acts of academic dishonesty, and was created with the intent of displaying on my portfolio.