from myro import * win = GraphWin("My Window", 500, 500) # GraphWin(string, width, height) color = color_rgb(100, 200, 50) # red, green, and blue are values from 0 to 255 win.setBackground(color) # sets background color of window to the color we created point = Point(100,25) # creates a point referencing location (100,25) message = Text(point, "Click on window") # creates message "Click on window" anchored at location (100,25) message.draw(win) # puts the message on the graph window click = win.getMouse() # Waits for user's mouse click and returns as a Point object message.undraw() # erases message from the graph window text = Text(click, "Some Text") # creates text "Some Text" anchored at location you clicked text.draw(win) # adds the text to the graph window topLeftPoint = Point(150,150) # creates the point for top left corner of the oval's bounding box bottomRightPoint = Point(300,400) # creates the point for bottom right corner of the oval's bounding box oval = Oval(topLeftPoint,bottomRightPoint) # creates the oval redColor = color_rgb(255,0,0) # defines the color red oval.setFill(redColor) # colors the oval red oval.draw(win) # draws the oval to the graph window wait(3) # Window will close in 3 seconds win.close() # Closes the window