A Basic arthimetic Operators modules
Project description
A brief description of what your project does and its purpose. python basic arthimetic operators
def add(a, b): """ Add two numbers.
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): """ Subtract one number from another.
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): """ Multiply two numbers.
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): """ Divide one number by another.
Parameters:
a (int or float): The numerator.
b (int or float): The denominator.
Returns:
float: The result of a divided by b.
Raises:
ZeroDivisionError: If b is zero.
"""
return a / b
def mod(a, b): """ Calculate the modulus of one number by another.
Parameters:
a (int or float): The dividend.
b (int or float): The divisor.
Returns:
int or float: The remainder of a divided by b.
"""
return a % b
def exp(a, b): """ Raise one number to the power of another.
Parameters:
a (int or float): The base.
b (int or float): The exponent.
Returns:
int or float: The result of a raised to the power of b.
"""
return a ** b
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
Close
Hashes for vishwa_data_python-111.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9df54f28e72f29c131230a17a7698b129627ea636cce949e9821404d2fcc57e4 |
|
MD5 | 9fae064c3ac8bee41a17f6f7d5ed6a38 |
|
BLAKE2b-256 | 436febb9a0770f8de1d26288dfa45698b8a4c7484eab80ec3a5e0407ac5a0b1e |