Python Turtle - Colourful Spirograph Tutorial

preview_player
Показать описание
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()
Рекомендации по теме
Комментарии
Автор

dear geek tutorials when i did this i had the error with the colors it said bad color string red, purple, blue, green, orange.yellow warmest regards your biggest fan :)

Asuuu
Автор

GRACIAS !!!!
Estoy llorando de alegria
Espero que lopongas en el traductor para que me entiendas y quiero decir Gracias por todo!!!!

davidcarrion
visit shbcf.ru