What does the problem asks for:
--> mean and median
Let's calculate the mean:

--> the sum of all the numbers = 21 + 40 + 48 + 26+ 32 + 31 = 198
--> number of numbers given: 6
==> let's calculate

Let's calculate the median
--> Median definition: middle number in an ordered sequence
==> let's order the sequence: 21, 26, 31, 32, 40, 48
--> since there are an even number of numbers, there isn't an exact
middle number
--> thus, we must find the mean of the two numbers closest to the
middle

Answer: 31.5