xxxxxxxxxx
30
let temp=78;
function setup() {
createCanvas(400, 400);
noLoop();
textSize(34);
}
function draw() {
background(220);
coatNeeded();
}
function coatNeeded(){
if(temp<65){
fill(0,0,200);
ellipse(200,200,50);
fill(0,0,255);
text("Cold", 100,100);}
else if(temp>85){
fill(200,0,0);
ellipse(200,200,50);
fill(255,0,0);
text("Hot", 100,100);}
else{fill(0,200,0);
ellipse(200,200,50);
fill(0,200,0);
text("Perfect", 100,100)}
}