Skip to main content

Basic calculator via terminal supporting addition, subtraction, multiplication, and division.

Project description

CLI Calculator

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

📦 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:

python main.py

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
├── main.py               # Entry point for the calculator
├── requirements.txt      # Project dependencies (currently empty)
├── setup.py              # Package configuration
├── .gitignore            # Git exclusions
└── README.md             # Project documentation

📜 Requirements

  • Python 3.8+

  • No external dependencies currently

👨‍💻 Author

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

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.1.tar.gz (3.1 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.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cli_calculator-0.0.1.tar.gz
  • Upload date:
  • Size: 3.1 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.1.tar.gz
Algorithm Hash digest
SHA256 5bb33017ef24cb3671c15e57292aeb9a55debd60af6fac3650ec60ac60b2819d
MD5 6ae37d8b96f1b0e8e19e51d694214f01
BLAKE2b-256 fa8022bfe9179bc2196968da875ec052552c844df9b13678fc664588858c5c8e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cli_calculator-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4c63c01eff6813d06a887651086e4fc174c7c7d6fbdc10d7a3f7bd2645c079a3
MD5 3b25b72b872d77d27e54df74cf683919
BLAKE2b-256 8bf980250ab6967d15cd1344c2af9f43e1aeb198f97bbc948939fce9fbba2f2d

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