A command-line calculator built with Python that supports basic arithmetic operations and scientific functions.
- Basic Operations:
+
,-
,*
,/
,**
(power),%
(modulo) - Scientific Functions:
sin
,cos
,tan
(Trigonometry, input in radians)log
(Base 10 logarithm)ln
(Natural logarithm)sqrt
(Square root)factorial
(Factorial of an integer)abs
(Absolute value)exp
(Exponential function)deg
(Convert radians to degrees)rad
(Convert degrees to radians)
- Infinite Input Handling: Process complex expressions like
5 + 4 * 2 - sin(3.14) / 2 + log(100)
. - Error Handling: Catches and displays errors effectively.
- Clone the repository:
git clone https://github.com/your-username/cli-calculator.git
- Change into the program directory
cd cli-calculator
- (OPTIONAL) Create a virtual environment for Linux users.
python3 -m venv venv
source venv/bin/activate
On Windows, use
python3 -m venv venv
.\venv\Scripts\activate
- Run the program
python3 main.py