Answer: Turtle Challenge #118

Here’s what the code from Turtle Challenge #118 draws. This picture was made by running the code for real.

The drawing made by turtle challenge 118.
What the turtle drew.

The answers

What will the line look like? A zigzag, like a lightning bolt or the edge of a crown. The turtle goes up, then down, again and again.

How many points will stick up? 11, one for each time round the loop.

How the code works

Each time round the loop the turtle turns right 90 degrees, draws, then turns left 90 degrees and draws again. Right then left, right then left: that’s a zigzag.

import turtle

t = turtle.Turtle()
t.speed(0)
t.pensize(6)
t.pencolor("deeppink")
t.left(45)

for zig in range(11):
    t.forward(40)
    t.right(90)
    t.forward(40)
    t.left(90)

t.hideturtle()
turtle.done()

Try it: Change 90 to a bigger number to make the zigzag sharper.