I just learned about cumulative frequency curve.
The books says I could use this curve to estimate the median of the data.

This is the picture that I cut from my book. As you can see, to estimate the median, the book find the x-coordinate of the point which has the y-coordinate (i.e. the cumulative frequency) of 150 (the total frequency is 300). My question is: why don't we use the mean of the 150th and the 151th data to estimate the median? Why do we use only the 150th data instead? This is really strange!
Also, what should we do to estimate the median when the total cumulative frequency is odd?
The general definition of median is the following
$$me=F^{-1}(0.5)$$
That is the value of "Marks" corresponding at 50% of frequencies
EDIT: answer to your comment.
Assume now we have 10 equiprobable discrete values. The cumulative frequency function is the following (I did not draw the function for the latest 3 values because not important in this reasoning)