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 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