diff --git a/__pycache__/calculator.cpython-312.pyc b/__pycache__/calculator.cpython-312.pyc index 09c608d..2aac3ba 100644 Binary files a/__pycache__/calculator.cpython-312.pyc and b/__pycache__/calculator.cpython-312.pyc differ diff --git a/__pycache__/test_calculator.cpython-312-pytest-9.0.2.pyc b/__pycache__/test_calculator.cpython-312-pytest-9.0.2.pyc new file mode 100644 index 0000000..5f31505 Binary files /dev/null and b/__pycache__/test_calculator.cpython-312-pytest-9.0.2.pyc differ diff --git a/calculator.py b/calculator.py index 24a2fef..bbfee0e 100644 --- a/calculator.py +++ b/calculator.py @@ -1,16 +1,31 @@ -def multiply(a,b): +def multiply(a, b): return a * b -def add(a,b): - return a+b +def add(a, b): + return a + b -def subtract(a,b): - return a-b +def subtract(a, b): + return a - b -def divide(a,b): - return a/b +def divide(a, b): + return a / b +def square(a): + return a * a -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 +def cube(a): + return a ** 3 + +def square_n_times(number, n): + result = number + total = 0 + for _ in range(n): + result = square(result) + total += result + return total + + +if __name__ == "__main__": + print("I'm going use the calculator functions to multiply 5 and 6") + x = multiply(5, 6) + print(x)