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
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
andturtle
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
forward(50)
left(90)
forward(50)
Optional goals
- the line width grows thicker from the inside to the outside
- there is a color gradient along the spiral