Skip to content

Commit 4134ea7

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 3b3253b commit 4134ea7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

maths/volume.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,7 @@ def vol_torus(torus_radius: float, tube_radius: float) -> float:
509509
raise ValueError("vol_torus() only accepts non-negative values")
510510
return 2 * pow(pi, 2) * torus_radius * pow(tube_radius, 2)
511511

512+
512513
def vol_octahedron(oct_side: float) -> float:
513514
"""
514515
| Calculate the Volume of an Octahedron.
@@ -534,6 +535,7 @@ def vol_octahedron(oct_side: float) -> float:
534535
raise ValueError("vol_octahedron() only accepts non-negative values")
535536
return oct_side**3 * 2**0.5 / 3
536537

538+
537539
def vol_icosahedron(tri_side: float) -> float:
538540
"""
539541
| Calculate the Volume of an Icosahedron.
@@ -584,7 +586,7 @@ def main():
584586
print(
585587
f"Hollow Circular Cylinder: {vol_hollow_circular_cylinder(1, 2, 3) = }"
586588
) # ~= 28.3
587-
print(f"Octahedron: {vol_octahedron(2.5) = }") # ~=7.37
589+
print(f"Octahedron: {vol_octahedron(2.5) = }") # ~=7.37
588590
print(f"Icosahedron: {vol_icosahedron(2.5) = }") # ~=34.09
589591

590592

0 commit comments

Comments
 (0)