'''Use Pillow for image representation''' # import the Pillow Image type from PIL import Image # import url for image input and output import url # will create d by d canvases d = 300 # scaling factor s = 50 # generate four colors with equal amounts of red, green, and blue for i in range( 1, 5 ) : amt = i * s gray = ( amt, amt, amt ) im = Image.new( 'RGB', ( d, d ), gray ) im.show() input( 'Enter when ready: ' )