To calculate the percentage of students who have dogs for pets, we divide the number of students with dogs (10) by the total number of students (10+8+2+3=23), then multiply by 100:
(10/23) * 100 = 43.5%
To calculate the percentage of students who have hamsters for pets, we divide the number of students with hamsters (3) by the total number of students (23), then multiply by 100:
(3/23) * 100 = 13%
Therefore, the difference in percentage of students who have dogs for pets and the percentage of students who have hamsters for pets is:
43.5% - 13% = 30.5%
Therefore, the correct answer is A. The difference in the percentage of students who have dogs for pets and the percentage of students who have hamsters for pets is 30.4%.