Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


def test_calculate_rectangle_area():
assert calculate_rectangle_area(1,2) == 2
assert calculate_rectangle_area(1,2) == 0



Expand Down