Answer: Turtle Challenge #168

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

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

The answers

Will the lines get longer or shorter? Longer! i goes up by 1 each time, so i * 4 makes every line 4 steps longer than the one before.

What shape does the spiral look like? It’s based on a square, because 91 degrees is close to 90. Because 91 is just a little more than 90, every corner is slightly off, so the spiral slowly twists round like a whirlpool.

How many colours will you see? 6: hotpink, dodgerblue, purple, darkorange, royalblue, limegreen. i % 6 picks the next colour in the list each time.

How the code works

The loop runs 80 times. Each line is longer than the last, and the turtle turns 91 degrees after each one, so the lines wind outwards.

import turtle

t = turtle.Turtle()
t.speed(0)
turtle.bgcolor("black")
colours = ["hotpink", "dodgerblue", "purple", "darkorange", "royalblue", "limegreen"]

for i in range(80):
    t.pencolor(colours[i % 6])
    t.forward(i * 4)
    t.left(91)

t.hideturtle()
turtle.done()

Try it: Change the angle by just 1 degree and run it again. Tiny changes can make a big difference!