Question: Provide an if statement that implements this logic: When the water temperature is less than 120 F, turn the heater on by assigning the value
Provide an if statement that implements this logic:
When the water temperature is less than 120 °F, turn the heater on by assigning the value “on” to a heater string variable. When the water temperature is greater than 140 °F, turn the heater off by assigning the value “off” to a heater string variable. Don’t do anything when the water temperature is between these two temperatures.
Step by Step Solution
3.43 Rating (162 Votes )
There are 3 Steps involved in it
Use an if else if statem... View full answer
Get step-by-step solutions from verified subject matter experts
