Coding Challenge: Spiral

The Challenge

Write a program, that draws a spiral:

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

Hints

  • 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:

  1. from turtle import forward, left
  2. forward(50)
  3. left(90)
  4. forward(50)

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