The median score is the middle score when the scores is arranged in decreasing or increasing order
The total number of scores is summation of the frequency

The median position is

The median position is 8th on the frequency column
From the frequency column, keep adding the frequency from the top and stop at 8
The test score when we keep adding the frequency from the top till 8 is 6
Hence, the median score is 6