40 liters of water = 40*(10³ cm³/L) = 4 x 10⁴ cm³
The density of water is 1 g/cm³, therefore 40 liters of water has a mass of
m = (4 x 10⁴ cm³)*(1 g/cm³) = 4 x 10⁴ g
The specific heat of water is c = 4.184 J/(g - °C).
For a temperature increase of ΔT = 2 °C, the thermal energy required is
Q = m*c*ΔT
= (4 x 10⁴ g)*(4.184 J/(g-°C))*(2 °C)
= 334,720 J = 334.72 kJ
Answer: 334.7 kJ (nearest tenth)