I don't understand what I'm doing wrong. It keeps saying that I'm returning the wrong value on an even list. The list it gives is [0,1,1,6,8,34] and for some reason I'm getting a return of 4.5 instead of 3.5. I think it has to do with the int() change from a float but I'm not sure. Thank you.
def median(num): num = sorted(num) total = 0 if len(num) % 2 == 0: total = len(num) / 2.0 total = (num[int(total+1)] + num[int(total-1)]) / 2.0 return total else: total = int(len(num) / 2.0) total = num[total] return total