It's throwing error messages, as if the code is ridiculous, but it seems so right to me. Help! I believe the problem is with the brackets on the even and odd list number calculation, correct?
Example error: Oops, try again. median([6, 8, 12, 2, 23]) returned 10.0 instead of 8
def median(list): sorts = sorted(list) length = len(sorts) if length == 1: return 1 if length % 2 == 0: return ((sorts[length/2]+ sorts[length/2-1]) / 2.0) else: return ((sorts[length/2] + sorts[length/2+1])/2.0)