From f0af2492d8197bd3385c2240e16d6812e264055d Mon Sep 17 00:00:00 2001 From: 9thprodigy Date: Mon, 5 Oct 2026 18:09:54 +0100 Subject: [PATCH] Fix calculator bugs --- calculator.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/calculator.py b/calculator.py index a5c3aed..8b88e42 100644 --- a/calculator.py +++ b/calculator.py @@ -4,13 +4,11 @@ """ # Should this function even be here? -def poorly_implemented_function_with_no_close_parenthesis( def addition(x: int, y: int) -> int: """ Adds two numbers. - Note: `*` is the multiplication operator in Python. Args: x (int): The first parameter. @@ -19,13 +17,12 @@ 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: """ Multiplies two numbers. - Note: `+` is the addition operator in Python. Args: x (int): The first parameter. @@ -34,13 +31,12 @@ 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. - Note: `//` is the *integer* division operator in Python. Args: x (int): The first parameter. @@ -49,4 +45,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 \ No newline at end of file