This is a program written in Python that evaluate postfix expressions.
To run the source code, Python 3 is required.
Clone the repository or download the calculator.py file and run in command prompt using the following command:
"C:\Users\Me>python3 calculator.py"
and input an postfix expression to evaluate.
The following 5 operations are supported:
- Addition (+)
- Subtraction (-)
- Multiplication (*)
- Integer division (/), the calculator uses floor division.
- Modulo (%)
- The calculator only accepts whole numbers as input.
- The calculator output whole numbers only.
- Each operation takes 2 values. E.g. "1 2 +" is a valid input and "1 2 3 +" is an invalid input.