From 7fc3f6834aee4d7bcfc0fab9e4d4b017b6cd5a07 Mon Sep 17 00:00:00 2001 From: cvanderwood Date: Mon, 19 Jan 2026 16:01:20 -0500 Subject: [PATCH 1/2] add square and cube --- calculator.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/calculator.py b/calculator.py index d6423cf..6800da2 100644 --- a/calculator.py +++ b/calculator.py @@ -10,6 +10,19 @@ def subtract(a,b): def divide(a,b): return a/b +def square(a) + return a*a + +def cube(a): + return a*a*a + +def square_n_times(number, n): + total = 0 + for _ in range(n): + number = square(number) + total += number + return total + print("I'm going use the calculator functions to multiply 10 and 2") c=multiply(10,2) print(c) From 2cf3e236865f5006e46b8a29a1cbe00bae053601 Mon Sep 17 00:00:00 2001 From: cvanderwood Date: Mon, 19 Jan 2026 16:04:45 -0500 Subject: [PATCH 2/2] add colon --- calculator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calculator.py b/calculator.py index 6800da2..8dea3b2 100644 --- a/calculator.py +++ b/calculator.py @@ -10,7 +10,7 @@ def subtract(a,b): def divide(a,b): return a/b -def square(a) +def square(a): return a*a def cube(a):