Welcome to Python Module Template’s documentation!

Functions

python_module_template.functions.add(a: int | float | List[int | float], b: int | float | List[int | float]) int | float | List[int | float]

Add two numbers or two lists element-wise.

Parameters: a (int, float, or list): First operand. b (int, float, or list): Second operand.

Returns: int, float, or list: The sum of the operands.

python_module_template.functions.divide(a, b) int | float

Divide two numbers.

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

Returns: int or float: The division of the two numbers.

python_module_template.functions.isIntOrFloat(vartotest)

Add an any type var.

Parameters: vartotest

Returns: true if vartotest is a float or an int, false otherwise

python_module_template.functions.power(base: float, exponent: int) float

Calculate the result of raising a base number to a given exponent.

Parameters:
  • base (float) – The number to be raised.

  • exponent (int) – The power to which the base number is raised.

Returns:

The result of base raised to the power of exponent.

Return type:

float

Example

>>> power(2, 3)
8
>>> power(5, 0)
1
>>> power(9, -2)
0.012345679
python_module_template.functions.squareRoot(a: int | float) int | float

take in arg a number and give the square root

Parameters: a (int or float)

Returns: int or float: The square root of the number

python_module_template.functions.subtract(a: int | float, b: int | float) int | float

Subtract 1 number to another.

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

Returns: int or float: The subtract of the two numbers.