Oops, try again. median([4, 5, 5, 4]) returned 5.0 instead of 4.5
Replace this line with your code.
def median(x): x=x.sort() b=len(x) if b%2==0: a=(x[b/2]+x[b/2-1])/2.0 else: a=x[b/2] return a
Hi! I don't understand what is wrong with my code. Maybe I missid something? Help me please