When I submit this, I get "median([1]) resulted in an error: list index out of range". I'm not really sure why. Am I missing something?

```
def median(x):
y = sorted(x)
if len(y) % 2 == 0:
a = len(y) / 2
return ((y[a] + y[a + 1]) / 2)
else:
b = ((len(y) + 1) / 2)
return y[b]
```