diff --git a/calculator.py b/calculator.py index 24a2fef..8dea3b2 100644 --- a/calculator.py +++ b/calculator.py @@ -10,7 +10,47 @@ 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) + +print("I'm going use the calculator functions to add 10 and 2") +d = add(10,2) +print(d) + +print("I'm going use the calculator functions to subtract 10 and 2") +e = subtract(10,2) +print(e) + +print("I'm going use the calculator functions to divide 10 and 2") +f = divide(10,2) +print(f) print("I'm going use the calculator functions to multiply 5 and 6") x = multiply(5,6) -print(x) \ No newline at end of file +print(x) + +print("I'm going use the calculator functions to add 5 and 6") +y = add(5,6) +print(y) + +print("I'm going use the calculator functions to subtract 5 and 6") +a = subtract(5,6) +print(a) + +print("I'm going use the calculator functions to divide 5 and 6") +b = divide(5,6) +print(b) \ No newline at end of file