Name: Anonymous 2011-10-12 16:54
Can someone list all the syntax and semantic errors in the following program. It's in Python/Jython.
def flag(size):
pic = makeEmptyPicture(size, size)
for x in range(size):
for y in rage(size):
pix = getPixel(pic, x, y)
#make the upper left black
if y <= (.5 * size) and x <= (.5 * size)
setColor(pix, black)
#make the upper left black
if y <= (.5 * size) and y <= (.5 * size):
setColor(pix, orange)
return pic
def flag(size):
pic = makeEmptyPicture(size, size)
for x in range(size):
for y in rage(size):
pix = getPixel(pic, x, y)
#make the upper left black
if y <= (.5 * size) and x <= (.5 * size)
setColor(pix, black)
#make the upper left black
if y <= (.5 * size) and y <= (.5 * size):
setColor(pix, orange)
return pic