Q7: A hacker manipulates the thermostat to turn 90 degrees everytime it hits…