_____  _                 __        __           _              _  ___ ___                    
   (_   _)| |                \ \      / /          | |            (_)/  _/  _|                _  
     | |__| |__ __ ______     \ \    / __ ______ __| |____ ___   _ _ | / | /      _____ ____ | | 
     | /  | __ / _` | __ )  __ \ \  / /  ` | __ /  \ /  _ / _ |\/_| |_ _|_ _| __  | __ / __ |_ _|
  /\_| |()| || |(_| | || | |\_\ \ \/ /| -  | || | -  | ___\__ | / | || | | | |\_\ | ||_| \__/| |_
  \____\__|_||_\__,_|_||_| \|_|  \__/ \__,_|_||_\__/_\___/__/ |_| |_||_| |_| \|_| |_||_\____||__/
                                                         |___/                                   

Command-line Calculator

Download .zip file

This is a calculator that you can run in a terminal. To run it, you need Python 2 or 3.

You can either use argument mode:

$ ./calculator.py '1+1'
2

or interpreter mode:

$ ./calculator.py
Type help for more info.
~ 1+1
2
~ 123sin(4!rad(56+log4))/(3+ln(3!))
-25.390453736
~

In both modes, you can assign variables with either of the following:

83->abc
83@abc

And access them like this:

3+abc
86
cos abc
0.249540117973

To see more of the features, type help in interpreter mode or run ./calculator.py help [page #].

Download terminal colors python module