Actually there is a trick to this. You can use the following examples to check your midpoints.
i) When there is a case whereby :
0 < x < or = 10
10 < x < or = 20
From the above you can see that the 1st class includes 10 while the 2nd class is right at the boundary of 10 so there is no way that the 1st class can have an upper boundary of 10.5 because it would have exceeded into the 2nd class. In this case the upper boundary would be 10. Therefore, your midpoint is 5.
ii) When there is a case whereby :
1 < or = x < or = 10
11 < or = x < or = 20
From the above you can see that the 1st class includes any number from 1 to 10 while the 2nd class from 11 to 20. Since there is no way that the two classes may interfere with one another as like how they would from the first case in (i), you can safely use the upper boundaries and lower boundaries to find your midpoint. Therefore, the midpoint for the 1st class would be 5 as well.
iii) When there is a case whereby :
0 < or = x < 10
10 < or = x < 20
From the above you can see that the intervals may interfere with one another if you consider the upper boundary for the 1st class as it will then exceed 10.5 which is intruding upon the 2nd class. Hence, it is not viable for you to consider finding the midpoints using the upper boundaries and the lower boundaries. Thus, you can just consider the median number, which is 5.
Hope this helps! All the best for Paper 6 tomorrow