From bf524e71a81a35ab30119ef1f552edc29732956a Mon Sep 17 00:00:00 2001 From: Sophie Hinterholzer <167458239+sophiehint@users.noreply.github.com> Date: Wed, 2 Apr 2025 12:28:20 +0200 Subject: [PATCH 1/2] Update main.py --- main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index d7c2c8d..4e3ab1e 100644 --- a/main.py +++ b/main.py @@ -1,11 +1,15 @@ def calculate_rectangle_area(length, width): - return length * width + + + return length*width def calculate_cuboid(length, width, height): - if height == 0: + if height==0: return calculate_rectangle_area(length, width), 0 else: + + surface_area = 2 * (length * width + length * height + width * height) volume = length * width * height return surface_area, volume From 5437e97d2d2a99d8cf5a293b04e5fc4512de5790 Mon Sep 17 00:00:00 2001 From: Sophie Hinterholzer <167458239+sophiehint@users.noreply.github.com> Date: Wed, 2 Apr 2025 12:29:01 +0200 Subject: [PATCH 2/2] Update test_main.py --- test_main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_main.py b/test_main.py index 73c1d85..45cd2ef 100644 --- a/test_main.py +++ b/test_main.py @@ -2,7 +2,7 @@ def test_calculate_rectangle_area(): - assert calculate_rectangle_area(1,2) == 2 + assert calculate_rectangle_area(1,2) == 0