75 pupils sat for a Science Test. The average score was 58 marks. If the average score of the girls was 62 marks and the average score of the boys was 56 marks, how many boys sat for the test?

Let g=number of girls,

and assuming all data given are exact (i.e. no rounding involved), then
g*62+(75-g)*58=56
Solve for g.

Looks to me like

g*62 + (75-g)*56 = 75*58

Or, since we're looking for the number of boys, not girls,

56b + 62(75-b) = 58*75

Right, there was a typo! Thought I corrected it. Thanks Steve!

Should read:
g*62+(75-g)*56=75*58

To find the number of boys who sat for the test, we need to consider the average score of the girls and boys.

Let's assume the number of boys as 'B'.

Since the average score of the girls is 62 marks, the total score of the girls would be 62 multiplied by the number of girls. Similarly, the total score of the boys would be 56 multiplied by the number of boys.

The total score of all the students can be calculated by multiplying the average score of all the pupils with the total number of pupils. In this case, it would be 58 multiplied by the total number of pupils, which is 75.

Now, we can form an equation using the above information.

(total score of girls + total score of boys) = total score of all pupils

(62 * number of girls) + (56 * number of boys) = 58 * 75

To find the number of boys, we need to solve this equation.

Since the total number of pupils is given as 75, we know that the number of girls is 75 minus the number of boys. Let's substitute that into the equation and solve for the number of boys.

(62 * (75 - B)) + (56 * B) = 58 * 75

Now, we can solve the equation:

(62 * 75 - 62 * B) + (56 * B) = 58 * 75

4650 - 62B + 56B = 4350

-6B = -300

Dividing by -6 on both sides, we get:

B = 50

Therefore, the number of boys who sat for the test is 50.