I get an error of: list indices must be integers, not float

I'm not sure what I did wrong.

Can someone help?

```
def median(lst):
lst = sorted(lst)
med = []
mn = 0
if len(lst) % 2 == 0:
med.append(float(len(lst)) / 2.0 + 0.5)
med.append(float(len(lst)) / 2.0 + 0.5)
for i in med:
mn += lst[i] / 2
return mn
return mn
else:
med.append(len(lst) / 2)
for i in med:
mn += lst[i]
return mn
return mn
```