turtle.forward(5)
turtle.right(72)
turtle.speed(10)
turtle.forward(5)
turtle.right(72)
turtle.speed(0)
turtle.forward(5)
turtle.right(72)
turtle.forward(5)

# change pen
turtle.penblock("white_wool")

# backward
turtle.speed(6)
turtle.backward(10)

# change pen
turtle.penblock("red_wool")

# pen up/down
turtle.penup()
turtle.forward(20)
turtle.pendown()

# change pen
turtle.penblock("green_wool")

# up, down, left
turtle.up(30)
turtle.forward(5)
示例#2
0
steve.forward(5)
steve.right(72)
steve.speed(10)
steve.forward(5)
steve.right(72)
steve.speed(0)
steve.forward(5)
steve.right(72)
steve.forward(5)

# change pen
steve.penblock(block.WOOL.id, 0)

# backward
steve.speed(6)
steve.backward(10)

# change pen
steve.penblock(block.WOOL.id, 1)

# pen up/down
steve.penup()
steve.forward(20)
steve.pendown()

# change pen
steve.penblock(block.WOOL.id, 2)

# up, down, left
steve.up(30)
steve.forward(5)