Coverage for src / math.py: 100%
6 statements
« prev ^ index » next coverage.py v7.14.0, created at 2026-05-19 07:17 +0000
« prev ^ index » next coverage.py v7.14.0, created at 2026-05-19 07:17 +0000
1"""Module for mathematical operations."""
4def add(a: float, b: float) -> float:
5 """Return the sum of two numbers."""
6 return a + b
9def divide(a: float, b: float) -> float:
10 """Divide two numbers and return the result.
12 Raises:
13 ZeroDivisionError: If the divisor is zero.
14 """
15 if b == 0:
16 raise ZeroDivisionError("Cannot divide by zero")
17 return a / b