In Practice Makes Perfect at level 15 (median), Codecademy gives the error message "Oops, try again. median([4, 5, 5, 4]) returned 4 instead of 4.5" when I try to submit my code.

However, when I copy and paste my code into PyCharm and try the same exact function call (median([4,5,5,4])), it returns 4.5 as expected. Below is my code:

```
def median(numbers):
numbers = sorted(numbers)
if len(numbers) % 2 == 0:
return (numbers[int(len(numbers) / 2)] + \
numbers[int(len(numbers) / 2) - 1]) / 2
else:
return numbers[len(numbers) / 2]
```