The objective of this mini-lab is to practice debugging code.
#Draw the flag of Kazooistan.
# The flag is square with three colored regions:
# the upper left quadrant is black, the upper right quadrant is orange
# and the bottom half is white.
#Parameter: size -- the width and height of the flag.
#Returns: an image of the flag.
def flag(size):
pic = makeEmptyPicture(size, size)
for x in range(size):
for y in rage(size):
pix = getPixel(pic, y, x)
# make the upper left black
if y <= (.5 * size) and x <= (.5 * size)
setColor(pix, black)
# make the upper right orange
if y <= (.5 * size) and y <= (.5 * size):
setColor(pix, orange)
return pic