def median(data):
    """Returns the median of data.

    Arguments:
        data (list):
            A list of numbers.

    Returns:
        float: Median of the provided data.
    """
    n = len(data)
    if n < 1:
        return None
    if n % 2 == 1:
        return sorted(data)[n//2]
    else:
        return sum(sorted(data)[n//2-1:n//2+1])/2.0