As far as I can see @stetim94 is correct that the problem is caused by this line and not using float division:

`m=(a[int(l/2)]+a[int(l/2)-1])/2`

So to solve it you need to make the dividend or divisor or both become a floating point number e.g. by literally adding a point:

`m=(a[int(l/2)]+a[int(l/2)-1])/2.`

or using the float() but as said use it on the dividend or the divisor as float((4+5)/2) will only yield 4. and not 4.5 . The reason why it works on your local environment is probably because you're using python3 there and there was a change to remove the ambiguity of the division operator:

https://www.python.org/dev/peps/pep-0238/

What really confuses me here is that you say you get 5 instead of 4 because integer division is a floor division to the next integer. Meaning it should round downwards (always), it is not rounding upwards and trying it in the CC editor yielded a 4 to me not a 5.