Skip to content

ivankozlovcodes/interpreter101

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Expression evaluator

Project for 42 Authorship Program. First project of "Write your own interpreter" cycle.

Mathematical expressions evaluator. Allows you to evaluate expression within range of supported operators.

Table of contents

Requirements

Python >= 3

Install

Simply clone the repo:

git clone https://github.com/IvanKozlov95/rpn_converter

Usage

Run main.py file and send expression string you want to evaluate:

./main.py "1 + 3 * (2 - 1)^2"

Or:

python main.py "1 + 3 * (2 - 1)^2"

Features

Following operations are supported

  • Addition/Subtraction
  • Multiplication
  • Division/Modulo
  • Power

License

This project is licensed under the Apache license 2.0.

Resources