Question 1009472
let x be questions of 2 marks and let y be questions of 4 marks, then
x + y = 15
2x + 4y = 40
solve first equation for y
y = 15 - x
substitute for y in second equation
2x + 4(15-x) = 40
2x + 60 - 4x = 40
-2x = -20 
x = 10
there were 10 questions of 2 marks attempted correctly