Skip to main content

Basic arithmatic operator modules

Project description

A brief description of your project, outlining its purpose and key functionality. A lightweight Python package that provides basic arithmetic operations, including addition, subtraction, multiplication, division, modulus, and exponentiation.

def add(a, b): """ Adds two numbers together.

Parameters:
a (int or float): The first number.
b (int or float): The second number.

Returns:
int or float: The sum of a and b.
"""
return a + b

def sub(a, b): """ Subtracts the second number from the first.

Parameters:
a (int or float): The number to be subtracted from.
b (int or float): The number to subtract.

Returns:
int or float: The difference of a and b.
"""
return a - b

def mul(a, b): """ Multiplies two numbers together.

Parameters:
a (int or float): The first number.
b (int or float): The second number.

Returns:
int or float: The product of a and b.
"""
return a * b

def div(a, b): """ Divides the first number by the second.

Parameters:
a (int or float): The dividend (numerator).
b (int or float): The divisor (denominator).

Returns:
float: The result of dividing a by b.

Raises:
ZeroDivisionError: If b is zero.
"""
return a / b

def mod(a, b): """ Returns the remainder of the division of the first number by the second.

Parameters:
a (int or float): The dividend.
b (int or float): The divisor.

Returns:
int or float: The remainder when a is divided by b.

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

subha_da-111.2.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.

Subha_DA-111.2-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file subha_da-111.2.tar.gz.

File metadata

  • Download URL: subha_da-111.2.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for subha_da-111.2.tar.gz
Algorithm Hash digest
SHA256 a0420bd4ef3dc09b74ba5842b476cdb23a31bf44f304acd44a5a62ac5517e8c9
MD5 07504b7e5ecfd72b144b6ec63f43379f
BLAKE2b-256 8ff69d745be87ef21b67572e5dfbdc33489944d41f9d0d3f1cd90b7a99a757d1

See more details on using hashes here.

File details

Details for the file Subha_DA-111.2-py3-none-any.whl.

File metadata

  • Download URL: Subha_DA-111.2-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for Subha_DA-111.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a04a4eb6438da3dfb91bf492369db976ae843749374f7d0bb035828fd9ea57d2
MD5 28ebf0322dac28fd8b6d9738bca38f2e
BLAKE2b-256 0b1b3b8af1cc7bd1fe5cb1b6bbc021245ad611004124ed21a15734b3c2ce9308

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