def median(numbers):
    """
    Parameters
    ----------
    numbers : list
        a list of numbers

    Returns
    -------
    median : double
        the median of the list of numbers passed
    """
    numbers.sort()
    if len(numbers) % 2 == 1:
        median = numbers[-round(-len(numbers) / 2)]
        median = round(median, 1)
    else:
        median = (
            numbers[int(len(numbers) / 2)] + numbers[int(len(numbers) / 2 - 1)]
        ) / 2
        median = round(median, 1)
    return median