def median(values):
    """Return median of list 'values'."""
    values.sort()
    if len(values) % 2 == 1:
        return values[int(len(values)/2)]
    else:
        return float((values[int(len(values)/2)]+values[(int(len(values)/2))-1])/2.0)