Python Turtle – Colourful Spirograph Tutorial

///Python Turtle – Colourful Spirograph Tutorial

Python Turtle – Colourful Spirograph Tutorial

FavoriteLoadingAdd to favorites

Learn how to quickly and easily draw a colourful hexagonal spirograph using the Turtle module in Python.

~ CODE ~

from turtle import *

speed(0)
bgcolor(“black”)

colours = [“red”, “purple”, “blue”, “green”, “orange”, “yellow”]

for i in range(360):
pencolor(colours[i%6])
width(i / 250 + 1)
forward(i)
left(59)

hideturtle()

source

By |2020-05-12T03:33:48+00:00May 12th, 2020|Python Video Tutorials|0 Comments

Leave A Comment

*