Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Median by olega
def checkio(data):
data = sorted(data)
data_len = len(data)
date_len_half = data_len//2
if data_len % 2 == 1:
median = data[date_len_half]
else:
median = float( data[date_len_half-1] + data[date_len_half] ) / 2
return median
Dec. 30, 2014