https://github.com/darky-github/calculator-cli
A CLI calculator program with basic and scientific modes.
https://github.com/darky-github/calculator-cli
calculator calculator-application calculator-python calculators cli cli-app python python3
Last synced: 3 months ago
JSON representation
A CLI calculator program with basic and scientific modes.
- Host: GitHub
- URL: https://github.com/darky-github/calculator-cli
- Owner: Darky-Github
- License: mit
- Created: 2025-03-24T14:43:40.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-03-24T15:03:22.000Z (3 months ago)
- Last Synced: 2025-03-24T15:45:11.938Z (3 months ago)
- Topics: calculator, calculator-application, calculator-python, calculators, cli, cli-app, python, python3
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CLI Calculator
A command-line calculator built with Python that supports **basic arithmetic operations** and **scientific functions**.
## Features
- 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.## Installation
1. Clone the repository:
```bash
git clone https://github.com/your-username/cli-calculator.git
```
2. Change into the program directory
```bash
cd cli-calculator
```
3. (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
```4. Run the program
```
python3 main.py
```