```
def median(numbers):
median=0
numbers_sorted=sorted(numbers)
length=len(numbers_sorted)
even_ind=length/2
even_lower=float(numbers[even_ind-1])
even_upper=float(numbers[even_ind])
for num in numbers_sorted:
if length%2==0:
median+=(even_lower+even_upper)/2.0
else:
from math import ceil
odd_ind=int(ceil(length/2))
median+=numbers[odd_ind]
return median
```

Can anyone tell me what's wrong?

It says that for median([4,5,5,4]) it returns 5.0 instead of 4.5.