Skip to content

Module Docstring.

Classes

Class for simple calculator operations.

Methods
staticmethod

divide(a, b)

Divide a by b.

Parameters
  • a (float) Dividend.
  • b (float) Divisor.
Returns (float)

The result of the division.

Raises
  • TypeError if a or b are not float numbers.
  • ZeroDivisionError if b is 0.
Examples

You can run this function as following.

>>> Calculator.divide(2,1)
2.0