mardi 17 décembre 2019

Turning off/on thermostat based on temp. and if it's raining or not

let temperature = 45
if temperature < 68 {
print("off")
}else {
print("on")
}

^^that is what I have so far, however I'm not sure how to add the isRaining and isOn properties to this code? And apparently the printed statement is meant to come out to be

true | false

or that's what it says when I try to turn in the assignment.. I've only been doing coding for about a week now so I'm really sorry if I sound dumb haha but any help would be awesome!!!

Aucun commentaire:

Enregistrer un commentaire