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

So I sorted the code and then I found the length.

When the length is divided by 2 and the remainder is 1 then it divides the index by 2 and returns the number in that index (i think).

Then if the remainder is equal than 0 then it divides the index of the number and gets that number. Then it takes divides the index again by 2 and then subtract by 1 to get the previous index

Then it takes those two numbers and divides it to get the median

```
def median(list_input):
list_input= sorted(list_input)
length=len(list_input)
if length%2==1:
a = list_input[length]/2
return a
elif length%2==0:
a = list_input[length]/2
b = list_input[length]/2-1
c = a/b
return c
```