```
def median(w):
a = sorted(w)
b = len(a)
for i in a:
if b % 2 == 0:
m = (a[b/2] + a[b/2-1]) / 2.0
else:
m = a[round(b/2)]
return median
```

This code gets the following error:

Oops, try again. median([1]) resulted in an error: list indices must be integers, not float