xxxxxxxxxx
25
/* My current sketch uses a for loop to draw 8 arcs on the screen. Help me alter the code inside the for loop so that every other arc would turn up side down like the example image. */
function setup() {
createCanvas(400, 400);
noFill();
stroke(255);
strokeWeight(5);
}
function draw() {
background(135, 206, 235);
for (let i = 0; i < 8; i++) {
if (i % 2 == 0) {
arc(50 * i + 25, height / 2, 50, 50, 0, PI);
} else {
arc(50 * i + 25, height / 2, 50, 50, PI, 0);
}
}
}