0 out of 464 challenges solved

Calculate Cone Volume

Write a Python function `volume_of_cone(radius, height)` that calculates the volume of a cone given its radius and height. The formula for the volume of a cone is:

\[ V = \frac{1}{3} \pi r^2 h \]

where:
- \( r \) is the radius of the base of the cone,
- \( h \) is the height of the cone,
- \( \pi \) is a mathematical constant approximately equal to 3.14159.

#### Example Usage
```python [main.nopy]
print(volume_of_cone(5, 12))  # Expected output: 314.1592653589793
print(volume_of_cone(10, 15)) # Expected output: 1570.7963267948965
```
import math

def volume_of_cone(radius, height):
    """
    Calculate the volume of a cone given its radius and height.

    Args:
        radius (float): The radius of the cone's base.
        height (float): The height of the cone.

    Returns:
        float: The volume of the cone.
    """
    # Placeholder for the solution
    pass