From 84ffe011d261dbfffd984e5fdcda7d7cf45ab87d Mon Sep 17 00:00:00 2001 From: hshimizu01 Date: Tue, 13 Jan 2026 22:22:32 -0500 Subject: [PATCH 1/4] add functions to calculator --- calculator.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 calculator.py diff --git a/calculator.py b/calculator.py new file mode 100644 index 0000000..b4eedf6 --- /dev/null +++ b/calculator.py @@ -0,0 +1,11 @@ +def add(a, b): + return a + b + +def subtract(a, b): + return a - b + +def multiply(a, b): + return a * b + +def divide(a, b): + return a / b From bba7875dd7e354d66a9e5d446dca943e8924ef67 Mon Sep 17 00:00:00 2001 From: hshimizu01 Date: Tue, 13 Jan 2026 22:24:39 -0500 Subject: [PATCH 2/4] I printed the answer of 30 divided by 6 --- calculator.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/calculator.py b/calculator.py index b4eedf6..b91d577 100644 --- a/calculator.py +++ b/calculator.py @@ -9,3 +9,7 @@ def multiply(a, b): def divide(a, b): return a / b + +print("I'm going use the calculator functions to divide 30 by 6") +x = divide(30,6) +print(x) From 76f46ccafe6d308abae54e674474088410df77ca Mon Sep 17 00:00:00 2001 From: hshimizu01 Date: Tue, 13 Jan 2026 22:33:03 -0500 Subject: [PATCH 3/4] defined add, subtract, divide, multiply functions and printed division of 30 / 6 --- calculator.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/calculator.py b/calculator.py index 1389a9f..b91d577 100644 --- a/calculator.py +++ b/calculator.py @@ -13,19 +13,3 @@ def divide(a, b): print("I'm going use the calculator functions to divide 30 by 6") x = divide(30,6) print(x) -def multiply(a,b): - return a * b - -def add(a,b): - return a+b - -def subtract(a,b): - return a-b - -def divide(a,b): - return a/b - - -print("I'm going use the calculator functions to multiply 5 and 6") -x = multiply(5,6) -print(x) From de69341ee17b018da2901445227351f5944b0894 Mon Sep 17 00:00:00 2001 From: hshimizu01 Date: Sun, 18 Jan 2026 09:25:42 -0500 Subject: [PATCH 4/4] slightly altered print line to pick up where i left off with hw --- calculator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calculator.py b/calculator.py index b91d577..547bda2 100644 --- a/calculator.py +++ b/calculator.py @@ -12,4 +12,4 @@ def divide(a, b): print("I'm going use the calculator functions to divide 30 by 6") x = divide(30,6) -print(x) +print(x)