Answer:
The energy needed to raise the temperature 18.0 grams of water is from 10.0°C to 40.0°C is 2,257.2 Joules.
Explanation:

Where:
Q = heat absorbed or heat lost
c = specific heat of substance
m = Mass of the substance
ΔT = change in temperature of the substance
: Initial and final temperature of the substance
We have mass of water = m = 18.0 g
Specific heat of water= c = 4.18 J/g°C
Initial and final temperature of the water= 
Final temperature of the water= 
Heat absorbed by the water:

The energy needed to raise the temperature 18.0 grams of water is from 10.0°C to 40.0°C is 2,257.2 Joules.