Answer:
We know that the total weight of the cakes is 12 cakes * 1.5 kg/cake = 18 kg
We also know that the piece given to boys is 20 g and that given to girls is 30 g.
Let's assume that the number of boys in the school is x.
The number of girls in the school is 2x because it is twice the number of boys.
The total weight of cake given to boys is x * 20 g = 20x g
The total weight of cake given to girls is 2x * 30 g = 60x g
The total weight of cake given to both boys and girls is 20x g + 60x g = 80x g
We can now set up the following equation: 80x g = 18 kg * 1000 g/kg
Solving for x, we get x = (18000/80) = 225
This means there are 225 boys in the school.
The number of girls in the school is 2x = 2 * 225 = 450
Therefore, the total number of children in the school is 450 girls + 225 boys = 675