Code

size (200, 200);
background (255, 0, 100);

for (int i=0; i<7; i++){
  float x = 39 + 7*i ;
  line(x,0,x,100);
}

0105 - For Loops III: Line Series

Statement:A simple code template is given to you here (http://www.golancourses.net/blog/2008/09/05/arithmetic-scaling-and-shifting/) Fill in the blanks (labeled ?????) so that the computer draws exactly seven vertical lines, whose coordinates are equally spaced between 39 and 81. In other words, there should be exactly seven lines, the leftmost of which is located at x=39, and the rightmost of which is located at x=81. You are forbidden from changing the initialization condition of the counting variable (i=0), nor may you change its incrementation method (i++).

Hint: you will need to use both multiplication and addition.

hide statement