```python
import math

def volume_cylinder(r, h):
    """
    Calculates the volume of a cylinder given its radius and height.
    """
    volume = math.pi * (r ** 2) * h
    return volume
```