You can use the thermal capacity of water to do this.
When we heat up something we convert some form of energi into heat. It has been found out that the amount of energy needed depends on the mass, temperature difference, and the material itself.
Heat capacity can be expressed with:
"c" is the heat capacity for a certain object/liquid/gas.
"E" is the energy added, "T" is the temperature difference, and "m" is the mass of the object/liquid/gas.
The heat capacity of water is:
This means it takes 4182J to heat 1kg of water by one degree Celcius.
We want to calculate the energy added to the water. In order to do that we just isolate E in the formula.
Before we put in the numbers, we want to convert "g" into "kg", because "m" is calculated in "kg", the SI-unit for mass.
Now we calculate:
Side note: Usually you differentiate between units and symbols by not writing units with cursive, but I don't know an easy way of not doing that on this website, so just imagine the units aren't written with cursive :)