'''lecture_10_turtle_objects.py Play around with multiple `Turtle` objects Oliver W. Layton CS 151: Computational Thinking: Visual Media Spring 2021 ''' import turtle # def goto(x,y): # turtle.goto(x, y) '''Screen''' # call Screen's constructor to make a new pop-up window/canvas myScreen = turtle.Screen() # Control how big we want it myScreen.setup(width=800, height=600) # Customize its background color myScreen.bgcolor('orange') # Control what is written on the top of the window myScreen.title('I am a screen object!') # Keep screen up until we click '''Turtles''' # create 2 turtles turt1 = turtle.Turtle() turt2 = turtle.Turtle() # Place them in different locations # turt1.goto(200, 200) # turt2.goto(-200, 200) # Pick their pens up, then goto their locations, then put one pen down # turt1.goto(200, 200) # turt2.penup() # turt2.goto(-200, 200) # turt2.pendown() # myScreen.exitonclick() # turn each one a different amount and move forward # put pens down, make each turtle unique: different shapes (e.g. turtle, arrow), colors and pen widths turt1.color('pink') turt2.color('blue') turtle.goto(200, 200) # calling turtle's goto function goto(200, 200) # calling my goto function # turt1.goto(200, 200) turt2.penup() turt2.goto(-200, 200) # calling turtle's goto function, BUT on turt2 turt2.pendown() myScreen.exitonclick() # Call method to determine each turtle object's color