turtle.stamp()
turtle.stamp() is used to stamp a copy of the turtle shape, it prints the shape at that point and moves forward with the instructions. Here shape of the turtle does not matter. It does the same for every turtle shape.
Example:
Here is the example of stamp() used:
import turtle
def tri():
for i in range(10):
turtle.degrees(60)
turtle.forward(200+10*i)
turtle.stamp()
turtle.right(200)
turtle.speed(7)
turtle.color("orange")
tri()
turtle.done()
Comments
Post a Comment