Skip to main content

A simple calculator package for basic math operations

Project description

'''# Simple Calculator - Ahmed Khaled

A simple Python library for basic arithmetic operations: addition, subtraction, multiplication, and division.

Installation

To install the package, use the following command:

pip install simple-calculator-ahmed-khaled

Usage

from simple_calculator_ahmed_khaled.calculator import add, subtract, multiply, divide

# Addition
result_add = add(15, 7)
print(f"Addition: {result_add}")

# Subtraction
result_subtract = subtract(15, 7)
print(f"Subtraction: {result_subtract}")

# Multiplication
result_multiply = multiply(15, 7)
print(f"Multiplication: {result_multiply}")

# Division
result_divide = divide(15, 7)
print(f"Division: {result_divide}")

# Division by zero
try:
    divide(15, 0)
except ValueError as e:
    print(e)

'''

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

simple-calculator-ahmed-khaled-0.1.0.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file simple-calculator-ahmed-khaled-0.1.0.tar.gz.

File metadata

File hashes

Hashes for simple-calculator-ahmed-khaled-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b334eae841facd823b9587096c3d17097d036cae1e5efd49b203d7dc9efa534c
MD5 698ebede03dea7085b6d571cd5ff5124
BLAKE2b-256 284ee9708a7d52bfcdcd2d7c46ce95ba4a857fcef849c8b98fa14fe1ed8f3f93

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for simple_calculator_ahmed_khaled-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cffc3d4cfda6cce7819d76a9d9994ab9b64f57d3e2ef47c6907e5aa80de4f997
MD5 a53e00eeb5d4cb0b32f08ac30b58122d
BLAKE2b-256 d12fca648f382408731abf968e8988902c5346cb4dc73b8c55a9561d28a75bc4

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