Coding Challenge: Spiral

The Challenge

Write a program, that draws a spiral:


When your program draws a spiral with at least 3 loops, you have mastered this challenge.

What you can practise in this coding challenge

  • loops
  • The Pillow library in Python
  • The turtle module in Python


  • It is sufficient to draw the spiral as a series of short lines
  • Where is it easier to start (inside or outside)?
  • Both the Python modules Pillow and turtle are up to the task

Getting started

If you have no idea where to start, try the following Python script:

from turtle import forward, left

Optional goals

  • the line width grows thicker from the inside to the outside
  • there is a color gradient along the spiral

Spiral with width and color

Blog Topics


See also