Skip to content
This repository was archived by the owner on Feb 15, 2026. It is now read-only.

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Command Line Calculator

A simple command-line calculator built in Python using the fire library.

Description

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.

Features

  • 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.

Setup

  1. Install the required libraries:

    pip install fire

Usage

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