xxxxxxxxxx
22
let temperature = -5;
function setup() {
createCanvas(400, 400);
background(255);
textSize(32);
}
function draw() {
if(temperature < 3){
background('gray');
text('It is very cold ☃️', 60, height/2);
} else if(temperature < 20){
background('lightblue');
text('It is quite cool 🌬', 60, height/2);
} else {
background('orange');
text('It is hot 😎', 60, height/2);
}
}