From 6fc456e05de4788e429df6cb932c161e071925aa Mon Sep 17 00:00:00 2001 From: Giovanni M Guidini <99758426+giovanni-guidini@users.noreply.github.com> Date: Thu, 4 Dec 2025 10:26:13 +0100 Subject: [PATCH 1/3] Add power function to calculator Testing testing --- app/calculator.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/calculator.py b/app/calculator.py index 4f380e8e..b05f1575 100644 --- a/app/calculator.py +++ b/app/calculator.py @@ -14,3 +14,6 @@ def divide(x, y): return 'Cannot divide by 0' return x * 1.0 / y + def pow(x, y): + return x**x + From 8e7b142947040a122f083edebe2451ba088bd3f4 Mon Sep 17 00:00:00 2001 From: Giovanni M Guidini <99758426+giovanni-guidini@users.noreply.github.com> Date: Thu, 4 Dec 2025 10:49:56 +0100 Subject: [PATCH 2/3] right operands, wrong operation? --- app/calculator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/calculator.py b/app/calculator.py index b05f1575..2597a6ec 100644 --- a/app/calculator.py +++ b/app/calculator.py @@ -15,5 +15,5 @@ def divide(x, y): return x * 1.0 / y def pow(x, y): - return x**x + return x * * y From cd76283a8648160f1f2aec642822e899746294cc Mon Sep 17 00:00:00 2001 From: Giovanni M Guidini <99758426+giovanni-guidini@users.noreply.github.com> Date: Tue, 9 Dec 2025 16:41:53 +0100 Subject: [PATCH 3/3] right operation, wrong operands --- app/calculator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/calculator.py b/app/calculator.py index 2597a6ec..b704483d 100644 --- a/app/calculator.py +++ b/app/calculator.py @@ -15,5 +15,5 @@ def divide(x, y): return x * 1.0 / y def pow(x, y): - return x * * y + return y ** y