@Livi Try putting a *
between the 7 and width
.
size(300, 300);
int xPosition;
int i=1;
xPosition = width/16;
fill(255, 0, 0);
noStroke();
rect(width/16, height/8, 7*width/8, 7*height/8);
for (i=2; i<=15; i++) {
fill(255,255,255);
stroke(2);
rectMode(CORNER);
rect(xPosition, 0, width/8, height/8);
}
And if you need any help on general coding see this:https://discourse.processing.org/t/some-guidance-for-beginners/115?u=madscientist