Skip to main content

A simple terminal calculator supporting basic arithmetic operations.

Project description

🧮 CLI Calculator

A simple terminal-based calculator that supports basic arithmetic operations: addition, subtraction, multiplication, and division.

Calculator on PyPI

cli_calculator 0.0.1

How to install: You can install the calculator directly from PyPI using pip:

pip install cli_calculator

📦 Features

  • [+] Addition (+ or add)

  • [-] Subtraction (- or subtract)

  • [*] Multiplication (* or multiply)

  • [÷] Division (/ or divide) - includes zero division handling

  • User-friendly terminal interface with clear examples

  • Modular structure with organized codebase

🚀 Usage

Run the calculator from the terminal:

cli_calculator

You'll see the operation menu and example inputs:

======================
|   + or add         |
|   - or subtract    |
|   * or multiply    |
|   / or divide      |
======================

Examples:
1 + 1 or 1 add 1
2 - 2 or 2 subtract 2
3 * 3 or 3 multiply 3
4 / 4 or 4 divide 4

Note: Operations must have a space before and after the operator (e.g., 3 + 2, not 3+2).

📁 Project Structure

cli_calculator/
├── basic_calculator/
│   ├── __init__.py
│   ├── basic.py          # Contains add & subtract functions
│   └── medium.py         # Contains multiply & divide functions
├── cli_calculator
    ├──__init__.py
    └── main.py           # Entry point for the calculator
├── requirements.txt      # Project dependencies (currently empty)
├── setup.py              # Package configuration
├── .gitignore            # Git exclusions
├── LICENSE               # 
└── README.md             # Project documentation

📜 Requirements

  • Python 3.8+

  • No external dependencies currently

👨‍💻 Author

Developed with care by Robson Barbiere 🧠💻 GitHub: robson-k

License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cli_calculator-0.0.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cli_calculator-0.0.2-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file cli_calculator-0.0.2.tar.gz.

File metadata

  • Download URL: cli_calculator-0.0.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for cli_calculator-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d5b4545d3adf725e6cbe1a86595c7a277f3f0914f68b205fc84ad7fd0c2b3010
MD5 87c537e20c72ac4f2a031658ff780a12
BLAKE2b-256 32b9669e1388b08d5037d2ca60fb03ac6ffd2173d37226d9b8684f00e08e000d

See more details on using hashes here.

File details

Details for the file cli_calculator-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: cli_calculator-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for cli_calculator-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a4b8d033a5347256a60c2e36cd3b98dc11a5200ba4f8ddff6f528f493358cc07
MD5 6afd5efd7934dbcf262e98ec0d8f1c5c
BLAKE2b-256 099fedca2c7b0020d4a46d956cb6f32931323d01b69a819076a2824cd735665b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page