Skip to main content

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

📄 License

This project is open source and free to use.

🏷️ Version

Current Version: 0.1.0

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

shyamanth_calculator-0.1.0.tar.gz (1.8 kB view details)

Uploaded Source

Built Distribution

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

shyamanth_calculator-0.1.0-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file shyamanth_calculator-0.1.0.tar.gz.

File metadata

File hashes

Hashes for shyamanth_calculator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2105e4ce2fca1188c4bdda056f29c69557a48d080b25b0c801f63c04277c921d
MD5 34f27470e612b39ec955bc3d1b00e9ef
BLAKE2b-256 76ec838fc2d46b69692bf5acff303347f53a05280d1ca181e14d519e1becfab4

See more details on using hashes here.

File details

Details for the file shyamanth_calculator-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for shyamanth_calculator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d4f43c2738b3dc7b5543d0eed62bdf5e42452609f5c8687907be60831c08497
MD5 28fc02c19aa3eff1029c69dde860aa36
BLAKE2b-256 3b5c4a1c742936f7fc031e3f2d7cadb76912d3dd35cf9ae0b81d5f0a7f435a01

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