From 719c3c5486135048ed29cd11850f629f8980afcc Mon Sep 17 00:00:00 2001 From: Ansh Verma Date: Thu, 13 Oct 2022 18:17:49 -0500 Subject: [PATCH 1/3] fixed issues --- calculator.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/calculator.py b/calculator.py index a5c3aed..1e4d05f 100644 --- a/calculator.py +++ b/calculator.py @@ -10,41 +10,41 @@ def addition(x: int, y: int) -> int: """ Adds two numbers. - Note: `*` is the multiplication operator in Python. + Note: `+` is the addition operator in Python. Args: x (int): The first parameter. - y (str): The second parameter. + y (int): The second parameter. 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. + Note: `*` is the multiplication operator in Python. Args: x (int): The first parameter. - y (str): The second parameter. + y (int): The second parameter. Returns: int: The multiple of `x` and `y`. """ - return x + y + return x * y def division(x: int, y: int) -> int: """ - Multiplies two numbers. + Divides two numbers. Note: `//` is the *integer* division operator in Python. Args: x (int): The first parameter. - y (str): The second parameter. + y (int): The second parameter. Returns: int: `x` divided by `y`. From 519add866c69d852d8494f9615e8348f680dbb53 Mon Sep 17 00:00:00 2001 From: Ansh Verma Date: Thu, 13 Oct 2022 18:19:22 -0500 Subject: [PATCH 2/3] fixed issue function --- calculator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calculator.py b/calculator.py index 1e4d05f..ea725db 100644 --- a/calculator.py +++ b/calculator.py @@ -4,7 +4,7 @@ """ # Should this function even be here? -def poorly_implemented_function_with_no_close_parenthesis( +# def poorly_implemented_function_with_no_close_parenthesis( def addition(x: int, y: int) -> int: """ From fd9b1170f09c94ac24b2d54420739ac9eba22b46 Mon Sep 17 00:00:00 2001 From: Ansh Verma Date: Thu, 13 Oct 2022 18:21:40 -0500 Subject: [PATCH 3/3] fixed division --- calculator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/calculator.py b/calculator.py index ea725db..01c8624 100644 --- a/calculator.py +++ b/calculator.py @@ -40,7 +40,7 @@ def division(x: int, y: int) -> int: """ Divides two numbers. - Note: `//` is the *integer* division operator in Python. + Note: `/` is the *integer* division operator in Python. Args: x (int): The first parameter. @@ -49,4 +49,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