Hi.

Can anyone help me here. I keep getting the following error message:

Oops, try again. median([1]) returned 6.0 instead of 1

But the code seems to work when I run it. I've gone over and over but can''t see what's wrong. A view from someone else would be helpful. Thanks

```
def median(X):
x.sort()
mid = len(x)/2 #middle number len(x) if divided by 2
if len(x) < 2:
return x[0]
else:
if len(x) % 2 == 0: #len(x) is even
return float(x[mid] + x[mid-1])/2 # 2 middle values averaged
else:
return float(x[mid]) #middle value
```