There are 27 students in the class. The maximum number of groups of 4 is 6, since 6x4=24 and 7x4=28. (There cannot be 7 groups as there aren't enough students, but there are 6 groups.)
Once 6 groups have been formed, 24 students will belong to some group. (6x4=24). This leaves 3 students without a group (since 27-24=3.)
There will be 3 students who are not in a group of 4.
Number of students in the class =24
Number of students required to form a group= 4
Total number of groups that can be formed→ divide 27 by 4 →answer 6 and remainder 3.
Thus six groups will be formed and three students will be left out.