Light Mode
Dark Mode
Everything seems fine, but ...

Hi! Please explain, where is mistake? Everything works fine on my own interpretor (Python 3.4), but here not. Why?

def checkio(data):
    data.sort()
    if len(data) % 2 == 1:
        return data[len(data)//2]
    else:
        return (data[len(data)//2-1]+data[len(data)//2])/2
Created: Dec. 14, 2014, 1:22 p.m.
Updated: Oct. 6, 2015, 2:30 p.m.
3
4
User avatar
VitalyEsipov