diff --git a/automation/sample_code.py b/automation/sample_code.py index b03d59d..cde8575 100644 --- a/automation/sample_code.py +++ b/automation/sample_code.py @@ -37,3 +37,23 @@ def multiply_two_numbers(a: int, b: int) -> int: if a < 0 or b < 0: raise ValueError("Only positive integers are allowed") return a * b + +def divide_two_numbers(a: int, b: int) -> int: + """Divide two positive integers together. + + Args: + a (int): First positive integer + b (int): Second positive integer + + Returns: + int: Product of the two numbers + + Raises: + ValueError: If either number is negative + TypeError: If inputs are not integers + """ + if not isinstance(a, int) or not isinstance(b, int): + raise TypeError("Inputs must be integers") + if a < 0 or b < 0: + raise ValueError("Only positive integers are allowed") + return a / b