A simple command-line calculator built in Python using the fire library.
The Command Line Calculator allows you to perform basic arithmetic operations like addition, subtraction, multiplication, and division right from your terminal. Operations are intuitive and user-friendly, thanks to the power of the fire library.
- Basic Operations: Supports addition, subtraction, multiplication, and division.
- Error Handling: Gracefully handles scenarios like division by zero.
- Command Line Interface: Easily interact with the calculator directly from your terminal.
-
Install the required libraries:
pip install fire
After setting up, navigate to the directory containing the script and use the calculator as follows:
-
Addition:
python calc.py add 5 3 -
Subtraction:
python calc.py subtract 5 3 -
Multiplication:
python calc.py multiply 5 3 -
Division:
python calc.py divide 5 3