Since we have 5 such cakes that are cut like this, we have 5*4 = 20 slices all together.
Count the number of dark shaded slices that are shown in the lower diagram. We have 4+3+4+2 = 7+6 = 13 slices of cake that are left over. This must mean the class ate 20-13 = 7 slices.
The fraction of the cakes eaten is 7/20
Notes:
7/20 = 35/100 = 0.35 = 35%
The fraction 7/20 cannot be reduced further because 7 and 20 have no common factors other than 1.