Skip to main content

A small example package for addition sub multiply divide

Project description

Here’s the finalized README.md for your ArthimeticOp Python package, tailored for GitHub and PyPI:


# ArthimeticOp

**ArthimeticOp** is a lightweight Python package that provides basic arithmetic operations — addition, subtraction, multiplication, and division — via simple, reusable functions.

## 📦 Features

- `add(a, b)` – Returns the sum of `a` and `b`.
- `subtract(a, b)` – Returns the result of `a - b`.
- `multiply(a, b)` – Returns the product of `a` and `b`.
- `divide(a, b)` – Returns the result of `a / b`. Raises `ValueError` on division by zero.

## 🔧 Installation

Install from [PyPI](https://pypi.org/project/ArthimeticOp/) using pip:

```bash
pip install ArthimeticOp

Or directly from GitHub:

pip install git+https://github.com/postboxat18/ArthimeticOp.git

🚀 Usage

from ArthimeticOp.ArthimeticOp import add, subtract, multiply, divide

print(add(4, 5))        # Output: 9
print(subtract(10, 3))  # Output: 7
print(multiply(6, 7))   # Output: 42
print(divide(8, 2))     # Output: 4.0

# Handle division by zero
try:
    divide(5, 0)
except ValueError as e:
    print(f"Error: {e}")  # Output: Error: Cannot divide by zero.

⚠️ Error Handling

The divide(a, b) function checks for division by zero and raises a ValueError if b == 0. Always use try-except blocks when dividing.

🤝 Contributing

Contributions are welcome! Here's how:

  1. Fork the repo
  2. Create a new branch (git checkout -b feature-name)
  3. Make your changes
  4. Commit (git commit -am 'Add new feature')
  5. Push to the branch (git push origin feature-name)
  6. Open a Pull Request

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

🔗 Project Links


---

### ✅ Notes:

- Make sure the folder structure supports:  
  `from ArthimeticOp.ArthimeticOp import ...`  
  That means your package directory should be:

ArthimeticOp/

└── ArthimeticOp.py

└── init.py


- Adjust the PyPI package name in your `pyproject.toml` to match `ArthimeticOp`.

If you need a matching `LICENSE` file or setup structure, just let me know.

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

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

arthimeticop-0.0.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: arthimeticop-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.0

File hashes

Hashes for arthimeticop-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6d40f244b2bf1207c97631b2cb1b97b4d3af15e4f516842cce28bfef06b06ca6
MD5 c0240530abb7ad575bf3a0c46647ddcd
BLAKE2b-256 d9c925e92a4ea6ae543b9452b9c35cb40dd63b3ef58c473a3c16f52d10bd9594

See more details on using hashes here.

File details

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

File metadata

  • Download URL: arthimeticop-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for arthimeticop-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0c9606e4e130e9b7c6e38318a7e5010b8534b215f096a1349a95dfe595170d5b
MD5 373952f6a3614a7424584bb3d16c94c3
BLAKE2b-256 fc6929dfe96a9fc05f601bb86587a4521220162a8be4fffa5b331ac1fcebca8a

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