# File: ChapterGraphics/rectFirst.py # A program that creates a rectangle on the graphic window from graphics import * def main(): win = GraphWin("Square 100x100 in (50,100)",300,300) r,g,b = 200,100,25 # red, green, blue s = 100 # size square x,y = 50,100 # rect upper left corner R = Rectangle( Point(x,y), Point(x+s, y+s) ) R.setFill(color_rgb(r,g,b)) # make colors or # R.setFill(#FFAC89) R.draw( win ) main()