Skip to content

This is a program written in Python that evaluate postfix expressions.

Notifications You must be signed in to change notification settings

osw282/Reverse-Polish-Notation-RPN-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Reverse-Polish-Notation-RPN-Calculator

This is a program written in Python that evaluate postfix expressions.

To run the source code, Python 3 is required.

HOW TO RUN??

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.

Supported Operations

The following 5 operations are supported:

  • Addition (+)
  • Subtraction (-)
  • Multiplication (*)
  • Integer division (/), the calculator uses floor division.
  • Modulo (%)

Restrictions

  • 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.

About

This is a program written in Python that evaluate postfix expressions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages