From a723e2f0cc18e136bf0c8d57bcdecdd6e3cfe8c6 Mon Sep 17 00:00:00 2001 From: ccoop129 Date: Tue, 20 Jan 2026 02:53:57 -0500 Subject: [PATCH] added square and squarentimes function --- calculator.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/calculator.py b/calculator.py index 24a2fef..908c1d2 100644 --- a/calculator.py +++ b/calculator.py @@ -10,6 +10,17 @@ 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): + result = number + for _ in range(n-1): + result = multiply(result, number) + return result print("I'm going use the calculator functions to multiply 5 and 6") x = multiply(5,6)