Print the Results of Various Volume Calculations.
()
| 541 | |
| 542 | |
| 543 | def main(): |
| 544 | """Print the Results of Various Volume Calculations.""" |
| 545 | print("Volumes:") |
| 546 | print(f"Cube: {vol_cube(2) = }") # = 8 |
| 547 | print(f"Cuboid: {vol_cuboid(2, 2, 2) = }") # = 8 |
| 548 | print(f"Cone: {vol_cone(2, 2) = }") # ~= 1.33 |
| 549 | print(f"Right Circular Cone: {vol_right_circ_cone(2, 2) = }") # ~= 8.38 |
| 550 | print(f"Prism: {vol_prism(2, 2) = }") # = 4 |
| 551 | print(f"Pyramid: {vol_pyramid(2, 2) = }") # ~= 1.33 |
| 552 | print(f"Sphere: {vol_sphere(2) = }") # ~= 33.5 |
| 553 | print(f"Hemisphere: {vol_hemisphere(2) = }") # ~= 16.75 |
| 554 | print(f"Circular Cylinder: {vol_circular_cylinder(2, 2) = }") # ~= 25.1 |
| 555 | print(f"Torus: {vol_torus(2, 2) = }") # ~= 157.9 |
| 556 | print(f"Conical Frustum: {vol_conical_frustum(2, 2, 4) = }") # ~= 58.6 |
| 557 | print(f"Spherical cap: {vol_spherical_cap(1, 2) = }") # ~= 5.24 |
| 558 | print(f"Spheres intersection: {vol_spheres_intersect(2, 2, 1) = }") # ~= 21.21 |
| 559 | print(f"Spheres union: {vol_spheres_union(2, 2, 1) = }") # ~= 45.81 |
| 560 | print( |
| 561 | f"Hollow Circular Cylinder: {vol_hollow_circular_cylinder(1, 2, 3) = }" |
| 562 | ) # ~= 28.3 |
| 563 | print(f"Icosahedron: {vol_icosahedron(2.5) = }") # ~=34.09 |
| 564 | |
| 565 | |
| 566 | if __name__ == "__main__": |
no test coverage detected