15. Median

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

```
Replace this line with your code.
import math
def median(lst):
sorted(lst)
if (len(lst) % 2) == 0:
return (lst[len(lst) / 2] + lst[len(lst)/2 + 1]) / 2
else:
return lst[math.ceil(len(lst) / 2)]
```