I'm getting an error "median([1]) resulted in an error: list index out of range". I tried a few other things - I understand the error - sorted_seq[int((half_seq)+0.5)] is giving a number larger than 1. But I'm not sure how that's happening and how to fix.

```
seq = []
def median(seq):
sorted_seq = sorted(seq)
half_seq = float(len(sorted_seq)/2.0)
if len(sorted_seq) % 2.0 != 0:
return sorted_seq[int((half_seq)+0.5)]
else:
return (float(sorted_seq[int(half_seq)] + sorted_seq[(int((half_seq)+1))])/2.0)
print median
```