From 4df11c1face4e405a4916f705aa67fc65f8295bf Mon Sep 17 00:00:00 2001 From: Ezimakyu <73717107+Ezimakyu@users.noreply.github.com> Date: Thu, 6 Feb 2025 18:25:10 -0600 Subject: [PATCH 1/2] Debug operations in calculator.py --- calculator.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/calculator.py b/calculator.py index a5c3aed..7497422 100644 --- a/calculator.py +++ b/calculator.py @@ -3,8 +3,7 @@ An extremely buggy Python math library . . . """ -# Should this function even be here? -def poorly_implemented_function_with_no_close_parenthesis( + def addition(x: int, y: int) -> int: """ @@ -19,7 +18,7 @@ def addition(x: int, y: int) -> int: Returns: int: The sum of `x` and `y`. """ - return x * y + return x + y def multiplication(x: int, y: int) -> int: """ @@ -34,7 +33,7 @@ def multiplication(x: int, y: int) -> int: Returns: int: The multiple of `x` and `y`. """ - return x + y + return x * y def division(x: int, y: int) -> int: """ @@ -49,4 +48,4 @@ def division(x: int, y: int) -> int: Returns: int: `x` divided by `y`. """ - return x // y \ No newline at end of file + return x // y From f3bb2c0f1d75fdec5b1f0023fa5095ed6a4eb83f Mon Sep 17 00:00:00 2001 From: Ezimakyu <73717107+Ezimakyu@users.noreply.github.com> Date: Thu, 6 Feb 2025 18:33:26 -0600 Subject: [PATCH 2/2] Fix division in calculator.py --- calculator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calculator.py b/calculator.py index 7497422..39f25cf 100644 --- a/calculator.py +++ b/calculator.py @@ -48,4 +48,4 @@ def division(x: int, y: int) -> int: Returns: int: `x` divided by `y`. """ - return x // y + return x / y