rows = 64 columns = 64 print "P3" print rows, columns print "255" topEdge = 10 botEdge = (rows - 1) - 10 leftEdge = 10 rightEdge = (columns - 1) - 10 y = 0 while (y < rows): x = 0 while (x < columns): if (((y == topEdge) or (y == botEdge)) and ((x >= leftEdge) and (x <= rightEdge))): print "0 255 0", elif (((x == leftEdge) or (x == rightEdge)) and ((y >= topEdge) and (y <= botEdge))): print "0 255 0", else: print "0 0 255", x += 1 print y += 1