calculator module
This module provides basic calculator functions:
Addition
Subtraction
Multiplication
Division
- calculator.divide(x, y)[source]
Calculate the quotient of two numbers.
- Parameters:
x (int or float) – the dividend
y (int or float) – the divisor
- Returns:
the quotient of x and y
- Return type:
int or float
- Raises:
ZeroDivisionError – error when the divisor is 0
- calculator.multiply(x, y)[source]
Calculate the product of two numbers.
- Parameters:
x (int or float) – the multiplicand
y (int or float) – the multiplier
- Returns:
the product of x and y
- Return type:
int or float