The range of the sin graph is the difference between the maximum and the minimum temperatures.
range = 80-40
amplituted = range/2 = 20
We also know that the period is 24 hours:
When t = 0, temperature = 60
But we are told that the temperature does decrease after midnight so we need to flip the function vertically to make sure that it is still set to decrease and reach a minimum after midnight.