The median is the term in the middle when all the data values are set in order from least to greatest.
In this case, our data values would be:
17 18 24 27 31 39 42 47 55 65
As you can see, the middle lies between the terms 31 and 39. In this case, we must add both terms up and divide by 2, since the middle value lies between them.
Thus, the answer would be 35.