CS 111 - 9/22/16 For the lab quiz on Monday, expect questions similar to last Monday's quiz x = 2 z = 0 for w in range (5) z = z + x x = 1 z = 0 for w in range (5) z = z + x x = x + 1 In the code above, w is often called the "loop varaible" The range(N) function in python produces a list of values from 0 to N-1 z = 0 for w in range (5): print w z = z + w print "After the loop, the value of z is" print z Chapter 4 - Pictures How pictures are encoded? - Picture - pixels (PIcture ELements), a grid - 3 colors (red, green, blue) - a number in range from 0 to 255