'''lecture_10_turtle_objects.py Play around with multiple `Turtle` objects Oliver W. Layton CS 151: Computational Thinking: Visual Media Fall 2020 ''' import turtle '''Screen''' # call Screen's constructor to make a new pop-up window/canvas theScreen = turtle.Screen() # Control how big we want it height = 600 width = 1200 theScreen.setup(height=height, width=width) # Customize its background color theScreen.bgcolor('green') # Control what is written on the top of the window theScreen.title('Hi CS151!') '''Turtles''' # create 2 turtles turt1 = turtle.Turtle() turt2 = turtle.Turtle() # Place them in different locations turt1.goto(-200, -200) turt2.goto(0, 100) # Pick their pens up, then goto their locations, then put one pen down turt1.penup() turt1.goto(200, 200) turt1.pendown() turt2.goto(100, 200) # turn each one a different amount and move forward turt1.left(45) turt1.backward(100) turt2.left(45) turt2.forward(100) # put pens down, make each turtle unique: different shapes (e.g. turtle, arrow), colors and pen widths turt1.pendown() turt2.pendown() turt1.goto(100, 0) turt2.goto(-100, 0) turt1.color('blue') turt2.color('red') turt1.shape('turtle') turt2.shape('arrow') turt1.pensize(10) turt2.pensize(3) turt1.forward(100) turt2.forward(100) # Call method to determine each turtle object's color # Keep screen up until we click theScreen.exitonclick()