This was my solution:

```
def median(numbers):
num_list = sorted(numbers)
for i in numbers:
if (len(num_list) % 2 == 0):
i = len(num_list) / 2
j = k - 1
median = (num_list[i] + num_list(j)) / 2
elif (len(num_list) % 2 != 0):
i = (len(num_list) + 1) / 2
median = num_list[i]
else:
median = num_list[0]
return median
```

but I got this error: > Oops, try again. median([1]) resulted in an error: list index out of range

please, what am I doing wrong, I'm confused!