The frequency table shows the scores (out of 5) in a mental-math test taken by 40 students. One frequency is missing.
Score | 0 | 1 | 2 | 3 | 4 | 5
Frequency | 3 | 7 | — | 10 | 6 | 4
(a) Find the missing frequency.
(b) Hence, find the range of the scores.