Skip to main content

A small example package

Project description

Calculator Project

Project Description

The Calculator Project is a simple yet powerful calculator application written in Python. It supports basic arithmetic operations such as addition, subtraction, multiplication, and division. The project is designed to provide an easy-to-use interface for performing quick calculations and serves as an educational tool for those learning Python programming.

Features

  • Addition: Add two numbers.
  • Subtraction: Subtract one number from another.
  • Multiplication: Multiply two numbers.
  • Division: Divide one number by another.
  • Command-line Interface: Perform calculations directly from the terminal.

Installation

Requires Python 3.7 or higher.

  1. Clone the Repository:

    git clone https://github.com/yourusername/calculator.git
    
  2. Navigate to the Project Directory:

    cd calculator
    
  3. Install Dependencies (if any):

    pip install -r requirements.txt
    

Usage

Command-line Usage

You can use the calculator directly from the command line.

  1. Run the Calculator:

    python calculator.py
    
  2. Perform Operations:

    # Example: Addition
    python calculator.py add 2 3
    # Output: 5
    

Demo

Example Code

You can also use the calculator functions in your Python code.

from calculator import add, subtract, multiply, divide

# Perform addition
result = add(10, 5)
print(f"10 + 5 = {result}")

# Perform subtraction
result = subtract(10, 5)
print(f"10 - 5 = {result}")

# Perform multiplication
result = multiply(10, 5)
print(f"10 * 5 = {result}")

# Perform division
result = divide(10, 5)
print(f"10 / 5 = {result}")

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

nandanisamplepackage-0.0.3.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

nandanisamplepackage-0.0.3-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file nandanisamplepackage-0.0.3.tar.gz.

File metadata

  • Download URL: nandanisamplepackage-0.0.3.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for nandanisamplepackage-0.0.3.tar.gz
Algorithm Hash digest
SHA256 1be2e120c1310114f258b51b1ccdc1b122cb267f57d278f7c711a2d00a858c78
MD5 fb8651ea626e62bf15ef2fb7f7d26246
BLAKE2b-256 6be20576c739559ec6249d5a1815b5040bab62832f258006f6b05bfc8166fbe5

See more details on using hashes here.

File details

Details for the file nandanisamplepackage-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for nandanisamplepackage-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8fea39b9264d7f495c074fe586a3428da657abcf26ae56746704e3e60478414a
MD5 9f75051771ab6fc2a0a41c8dde6c8e64
BLAKE2b-256 f2df51eeddfa124b47fa92ebb0ed513ed2e7edc9996d7647cefde679c0687c71

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