Skip to main content

A simple utility package.

Project description

def floor(a, b): """ Returns the floor division of a by b.

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

Returns:
int: The floor division of a by b.

Example:
>>> floor(10, 3)
3
"""
return a // b

def pow(a, b): """ Returns the value of a raised to the power of b.

Parameters:
a (int or float): The base.
b (int or float): The exponent.

Returns:
int or float: The value of a raised to the power of b.

Example:
>>> pow(2, 3)
8
"""
return a ** b

def add(a, b): """ Returns the sum of a and b.

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

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

Example:
>>> add(5, 3)
8
"""
return a + b

def sub(a, b): """ Returns the difference of a and b.

Parameters:
a (int or float): The minuend.
b (int or float): The subtrahend.

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

Example:
>>> sub(5, 3)
2
"""
return a - b

def mul(a, b): """ Returns the product of a and b.

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

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

Example:
>>> mul(5, 3)
15
"""
return a * b

def div(a, b): """ Returns the division of a by b.

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

Returns:
float: The division of a by b.

Example:
>>> div(10, 3)
3.3333333333333335
"""
return a / b

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

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

Returns:
int or float: The remainder of the division of a by b.

Example:
>>> mod(10, 3)
1
"""
return a % 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

vishwa_packages-1.1.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

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

vishwa_packages-1.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file vishwa_packages-1.1.tar.gz.

File metadata

  • Download URL: vishwa_packages-1.1.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for vishwa_packages-1.1.tar.gz
Algorithm Hash digest
SHA256 5ff4d28fd97244ba4dee810c9f995748e72dd599e171dc63475fe6865e5a2eae
MD5 87fcced7818747b234c3f83f4de23637
BLAKE2b-256 71bf8d40b14035f41de1fa2821084970f75d19f5f9992a9e69683dc18316870b

See more details on using hashes here.

File details

Details for the file vishwa_packages-1.1-py3-none-any.whl.

File metadata

  • Download URL: vishwa_packages-1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for vishwa_packages-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5cce1cd1355b62f291f7b74f051bfd40f2ff0f660170f29e9733193a212e1649
MD5 0a09bd1fa0c263ab80b120f358701f1f
BLAKE2b-256 c1a633929565ffdc5a519f4c19151afb95ccffb7996aff9327e712045cd97d76

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