# # Fill the window with a smooth color gradient from black to gold. # from SimpleGraphics import * # For each row in the window. for y in range(getHeight()): # Set the color. r = y / (getHeight() - 1) * 255 g = y / (getHeight() - 1) * 192 b = y / (getHeight() - 1) * 64 setColor(r, g, b) # Draw a horizontal line. line(0, y, getWidth() - 1, y)