Fix the errors in the following code.

size(200,200;
background();
stroke 255;
fill(150)
rectMode(center);
rect(100,100,50);

Answer:

size(200,200);
background(0);
stroke(255);
fill(150);
rectMode(CENTER);
rect(100,100,50,50);

Please note there is an error in the book, the first line of the exercise is the solution (i.e. the line of code “size(200,200);” is written correctly). See Errata p.24.