math_operations module

This module contains basic mathematical operations.

math_operations.add(a, b)[source]

Adds two numbers.

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

Returns: int, float: The sum of the two numbers.

math_operations.divide(a, b)[source]

Divides the first number by the second.

Parameters: a (int, float): The numerator. b (int, float): The denominator.

Returns: float: The quotient of the division.

Raises: ValueError: If the denominator is zero.

math_operations.multiply(a, b)[source]

Multiplies two numbers.

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

Returns: int, float: The product of the two numbers.

math_operations.subtract(a, b)[source]

Subtracts the second number from the first.

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

Returns: int, float: The difference between the two numbers.