ok im getting a little bit pissed right now. i looked all over the forum and still couldn't figure out what is wrong. can someone please help me, can someone please explain to me step by step why my code does't work

Oops, try again. median([4, 5, 5, 4]) returned 5.0 instead of 4.5

i don't understand why i don't get 4.5 instead of 5.0. i tried with the float() but still, 5.0

```
def median(some_list):
lenght = len(some_list)
for i in sorted(some_list):
if lenght == 1:
return some_list[0]
if lenght % 2 == 0:
one = some_list[lenght / 2]
two = some_list[(lenght / 2) - 1]
res = one + two
return res / 2.0
elif lenght % 2 != 0:
some_list = some_list[:-1]
one = some_list[lenght / 2]
two = some_list[(lenght / 2) - 1]
res = one + two
return res / 2.0
```