median

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

im not sure why this code doesn't work. ive been doing this for a while and my eyes aren't seeing anything. can anybody point me in the right direction?

```
def median(s):
s = sorted(s)
a = len(s)
if a % 2 == 0:
# return average of middle two numbers
b = (a - 1) / 2
c = (b - 1)
d = (s[b] + s[c]) / 2.0
return d
else:
b = (a - 1) / 2
return s[b]
print median([4, 5, 5, 4])
```