Added after Subhotosh Khan changed his response: Now I have to disagree! First, that last computation, 1.5 = (10*0 + 1*5 + 2*8 + 3*Y + 4*3)/(10+5+8+Y+3), was for the mean, not median. The "median" is the "middle number" in the sense that half the data lies below it, half above. (That's the "definition" you needed to know, AhmedFathy.) With the data given here, that means we must have 10+ 5, the number of cases with "absent days" less than 1.5, equal to 8+ y+ 3, the number of cases with "absent days" larger than 1.5. That is, solve 10+ 5= 8+ y+ 3 for y.
(Strictly speaking, since "absent days" is an integer, with that value of y, the "median" could be any number between 1 and 2. By convention, if the median is between two of the given values, it is half way between.)