From f5cbd6f47feb4b576e9345f7a21038450c6333b6 Mon Sep 17 00:00:00 2001 From: Juan C Gomez Date: Mon, 18 Jul 2022 16:57:20 -0700 Subject: [PATCH 1/4] BUGFIX: 3 arg subtraction was not implemented The following changer allows us to sub three args --- src/calc_test.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calc_test.py b/src/calc_test.py index 2911910..e5d611d 100644 --- a/src/calc_test.py +++ b/src/calc_test.py @@ -17,6 +17,9 @@ def test_sub_2arg(self): # Make sure 4 - 3 = 1 self.assertEqual(sub(4, 3), 1, 'subtracting three from four') + def test_sub_3arg(self): + self.assertEqual(sub(4, 3, 1), 0, 'subtracting three from four') + if __name__ == '__main__': unittest.main() From 4e83cdd77ec798482e3b9acb0c52a762c8e4907a Mon Sep 17 00:00:00 2001 From: jugomezv <109560870+jugomezv@users.noreply.github.com> Date: Mon, 18 Jul 2022 17:18:11 -0700 Subject: [PATCH 2/4] support for third arg in sub --- src/calc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calc.py b/src/calc.py index 2af3c17..338e0f5 100644 --- a/src/calc.py +++ b/src/calc.py @@ -9,7 +9,7 @@ def add(a, b, third_operand = 0): """ return a + b + third_operand -def sub(a, b): +def sub(a, b, c =0): """ Subtract some numbers From 2b957e6ad169b95c83e8dd029b6e2d48152db930 Mon Sep 17 00:00:00 2001 From: jugomezv <109560870+jugomezv@users.noreply.github.com> Date: Mon, 18 Jul 2022 17:27:44 -0700 Subject: [PATCH 3/4] Apply suggestions from code review --- src/calc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calc.py b/src/calc.py index 338e0f5..d90b740 100644 --- a/src/calc.py +++ b/src/calc.py @@ -9,7 +9,7 @@ def add(a, b, third_operand = 0): """ return a + b + third_operand -def sub(a, b, c =0): +def sub(a, b, third_arg =0): """ Subtract some numbers From a6840873e694d3455d556f215d98b2d790345ae1 Mon Sep 17 00:00:00 2001 From: jugomezv <109560870+jugomezv@users.noreply.github.com> Date: Mon, 18 Jul 2022 17:45:59 -0700 Subject: [PATCH 4/4] Create README.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..f6e6512 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# learn-git +Hello Class! + +## Slam + +
+ +package.json +test + +