Coverage for testmodule / operations.py: 100%
2 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-06 15:51 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-06 15:51 +0000
1"""
2Operations module containing mathematical functions.
4This module provides basic mathematical operations, such as adding a constant to numbers.
5"""
8def add2(number: int | float) -> int | float:
9 """
10 Add 2 to a given number.
12 Parameters
13 ----------
14 number : int or float
15 The number to add 2 to.
17 Returns
18 -------
19 int or float
20 The result of adding 2 to the input number.
22 Examples
23 --------
24 >>> add2(5)
25 7
26 >>> add2(3.5)
27 5.5
28 """
29 return number + 2