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
    

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.2.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.2-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nandanisamplepackage-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 eacb05d9d38f03e924994d306fbe4931e3f9ecb58dadd4483eaae2582dc4f55b
MD5 a03639d1d4f086bc6de5d872343fe263
BLAKE2b-256 dbe05844b659f908885b7e87a73dfda932a2797d200c0204d8cab1a626826173

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nandanisamplepackage-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fc4ec0ca73f3a7e6ae269f6967f32f716575c5eabfa07aa6dfa805b50889ca6b
MD5 9cbe583ac1ad0a5c0bdd93e069af34e1
BLAKE2b-256 f484b74152e2e4cee1d717496d090fe2251627b5b9b0485eca8d9f07935e4d19

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