Skip to content

Commit 6bbdd98

Browse files
authored
Update area.py
Added functions for cone and cylinder lateral surface areas
1 parent d80f3ed commit 6bbdd98

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

maths/area.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def lateral_surface_cylinder(radius: float, height: float) -> float:
235235
Formula: 2 * pi * r * h
236236
237237
>>> lateral_surface_cylinder(10, 20)
238-
702.4814731040726
238+
1256.6370614359173
239239
>>> lateral_surface_cylinder(6, 8)
240240
301.59289474462014
241241
>>> lateral_surface_cylinder(0, 0)
@@ -636,3 +636,4 @@ def area_reg_polygon(sides: int, length: float) -> float:
636636
print(f"Equilateral Triangle: {area_reg_polygon(3, 10) = }")
637637
print(f"Square: {area_reg_polygon(4, 10) = }")
638638
print(f"Reqular Pentagon: {area_reg_polygon(5, 10) = }")
639+

0 commit comments

Comments
 (0)