Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Median by furas
def checkio(data):
d = sorted(data)
l = len(d)
m = l//2
if l%2 == 1:
result = d[m]
else:
result = (d[m] + d[m-1])/2
return result
#These "asserts" using only for self-checking and not necessary for auto-testing
April 29, 2014
Comments: