Light Mode
Dark Mode
Feedback from user gp48maz1
The question asked for a float answer and when I return a float answer I recieve an error saying list indices must be integers, not float...

Given that I am fairly certain my answer is correct for the Median question:

    data.sort()
if len(data) %2 ==0:
return (data[len(data)/2 ]+data[len(data)/2-1])/2.0
else:
return (data[(len(data)+1)/2-1])/1.0 

URL from: http://www.checkio.org/mission/median/solve/
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36
  • feedback
Created: Feb. 27, 2014, 6:19 a.m.
Updated: Feb. 27, 2014, 7:28 a.m.
0
8
User avatar
gp48maz1