A Python package that provides essential mathematical operations (add, subtract, multiply, divide, modulo, power) with built-in error handling for safe calculations.
Project description
Shyamanth Calculator 🧮
A lightweight and beginner-friendly Python calculator library for basic arithmetic operations with built-in error handling.
🚀 Features
- ➕ Addition – Add two numbers
- ➖ Subtraction – Subtract two numbers
- ✖️ Multiplication – Multiply two numbers
- ➗ Division – Divide numbers with zero-division protection
- 🔢 Modulo – Calculate remainder safely
- 🔋 Power – Raise a number to a power
📦 Installation
Install from PyPI:
pip install shyamanth-calculator
🧑💻 Usage
from shyamanth_calculator import add, subtract, multiply, divide, mod, power
Addition
result = add(5, 3)
print(result) # Output: 8
Subtraction
result = subtract(10, 4)
print(result) # Output: 6
Multiplication
result = multiply(6, 7)
print(result) # Output: 42
Division
result = divide(20, 4)
print(result) # Output: 5.0
Division by Zero (Handled)
result = divide(10, 0)
print(result) # Output: Error: Division by zero is not allowed.
Modulo
result = mod(17, 5)
print(result) # Output: 2
Power
result = power(2, 8)
print(result) # Output: 256
Requirements
- Python >= 3.10
Author
Shyamanth Reddy
- 📧 Email: shyamanthreddy.m@gmail.com
- 🔗 GitHub: https://github.com/Shyamanth-2005
📄 License
This project is open source and free to use.
🏷️ Version
Current Version: 0.1.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shyamanth_calculator-0.1.0.tar.gz.
File metadata
- Download URL: shyamanth_calculator-0.1.0.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2105e4ce2fca1188c4bdda056f29c69557a48d080b25b0c801f63c04277c921d
|
|
| MD5 |
34f27470e612b39ec955bc3d1b00e9ef
|
|
| BLAKE2b-256 |
76ec838fc2d46b69692bf5acff303347f53a05280d1ca181e14d519e1becfab4
|
File details
Details for the file shyamanth_calculator-0.1.0-py3-none-any.whl.
File metadata
- Download URL: shyamanth_calculator-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d4f43c2738b3dc7b5543d0eed62bdf5e42452609f5c8687907be60831c08497
|
|
| MD5 |
28fc02c19aa3eff1029c69dde860aa36
|
|
| BLAKE2b-256 |
3b5c4a1c742936f7fc031e3f2d7cadb76912d3dd35cf9ae0b81d5f0a7f435a01
|