To find the total number of students in the school, we can set up a simple equation based on the information given.
Let \( X \) be the total number of students in the school. According to the problem, 40% of the total students advanced, and that number is given as 240 students.
We can express this in an equation:
\[ 0.40 \times X = 240 \]
To solve for \( X \), divide both sides by 0.40:
\[ X = \frac{240}{0.40} \]
Calculating the right side:
\[ X = 240 \div 0.40 = 240 \div \frac{4}{10} = 240 \times \frac{10}{4} = 240 \times 2.5 = 600 \]
Thus, the total number of students in the school is 600.