To find the relative frequency of 7th graders who prefer dogs, we first need to determine the total number of 7th graders surveyed, which can be calculated by summing all the preferences for 7th graders:
- Prefers Cats: 36
- Prefers Dogs: 8
- No Preference: 2
Total 7th Graders = 36 + 8 + 2 = 46
Next, we find the number of 7th graders who prefer dogs, which is 8.
Now, we calculate the relative frequency of 7th graders who prefer dogs using the formula:
\[ \text{Relative Frequency} = \frac{\text{Number of students who prefer dogs}}{\text{Total number of students}} \times 100% \]
Substituting in the values we have:
\[ \text{Relative Frequency} = \frac{8}{46} \times 100% \]
Calculating this gives:
\[ \text{Relative Frequency} \approx 0.1739 \times 100% \approx 17.39% \]
Rounding to the nearest tenth, the relative frequency of students who prefer dogs and are 7th graders is 17.4%.
Therefore, the correct answer is:
17.4%