'''lecture_15_zelle_demo.py A basic program with a shape in the Zelle Graphics Module Oliver W. Layton CS 151: Computational Thinking: Visual Media Spring 2021 ''' import graphics as gr # Create the screen myScreen = gr.GraphWin('This is a Zelle Canvas!', width=700, height=600) # Create an oval shape myOval = gr.Oval(gr.Point(100, 100), gr.Point(300, 200)) myOval.draw(myScreen) # Set the fill color, outline width, and outline color (as RGB color) myOval.setFill('red') myOval.setWidth(7) # myOval.setOutline('blue') # set outline color # Set outline color using RGB colors myOval.setOutline(gr.color_rgb(0, 200, 255)) # Draw the oval to the screen # Pause until we click myScreen.getMouse() # After we click, remove the oval from the screen, pausing again to see the blank screen # myOval.move(30, 50) myOval.move(-50, -10) # Close the window after the 2nd click myScreen.getMouse() myOval.undraw() myScreen.getMouse() myScreen.close()