Hi

Does anybody can explain and help

I can count and find middle values and etc , but how i can get in this code real result of dividing

def median(data):

count =0

total =0

data.sort()

for x in data:

count +=1

total +=x

print total,count

return total/count

print median([4,5])

return is now 4 but result of 9/2 should be 4.5 ?

How I can return 4.5?