From bb1a2c5c459c1189443391122f9177313945932a Mon Sep 17 00:00:00 2001 From: SallyXue-0114 <92959551+SallyXue-0114@users.noreply.github.com> Date: Thu, 6 Feb 2025 18:28:51 -0600 Subject: [PATCH] Update calculator.py --- calculator.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/calculator.py b/calculator.py index a5c3aed..b5fe534 100644 --- a/calculator.py +++ b/calculator.py @@ -3,9 +3,6 @@ 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: """ Adds two numbers. @@ -19,7 +16,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,11 +31,11 @@ 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: """ - Multiplies two numbers. + Divide two numbers. Note: `//` is the *integer* division operator in Python. @@ -49,4 +46,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