'''lecture_14_shallow_copy.py Illustrate a shallow copy of an object Oliver W. Layton CS 151: Computational Thinking: Visual Media Fall 2020 TODO: Make turtle2 a deep copy (clone) of turtle 1 ''' import turtle screen = turtle.Screen() # Make a turtle, customize it turt1 = turtle.Turtle() turt1.shape('turtle') turt1.color('red') turt1.width(5) # Make turt2, a shallow copy of turt1 # turt2 = turt1 turt2 = turt1.clone() # Modify turt2 turt2.color('blue') # Move turt1 turt1.goto(200, 0) input('Press enter if you want to see the 2nd turtle move') # Move turt2 turt2.goto(400, 0) screen.exitonclick()