A researcher recorded the ages of participants in a nutritional study. The ages are as follows:
23, 25, 27, 29, 29, 30, 32, 33, 35, 40
What is the range of this set of ages? The range is defined as the difference between the maximum and minimum values in a dataset.