Hi guys,

My code does not seem to be working for some reason

The code returns 4 instead of 4.5 when looking at (4,5,5,4)

I am not sure why it does not return 4.5, please help me out if possible!

```
def median(lst):
lst.sort()
length = len(lst)
med = (len(lst) + 1)/2
medi = 2*med
thingy = (lst[length/2] + lst[(length/2) -1])
thingy2 = thingy/2
if med%2 != 0:
return lst[med-1]
elif len(lst) == 1:
return i
else:
return (lst[length/2] + lst[(length/2) -1])/2
```