Ativerc / python-calculator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python Calculator

HacktoberFest 2019

Only for Road to Hacktober participants

How to use

Check your python version with python --version.

If the version is 3.x then simply do

python cli.py multiply 2 7 3

If the version is 2.7.x then download Python 3 and use like this.

python3 cli.py multiply 2 7 3

The result of running the above commands should be

------
42
------

Note- You can enter as many numbers as you want. Try running python3 cli.py average 2 7 3 11 89.

How to add new operations

  1. Define a new method in Calculator.py.
  2. Add the condition for calling new method in the calculate function of cli.py.

About


Languages

Language:Python 100.0%