Skip to content
Sign upLog in
← Back to Community
Spirograph tutorial.
Profile icon
CoolPanda123

Hello everyone! this is my tutorial on how to create a Spirograph in Python(with Turtle).

from turtle import * pensize(2) speed(0) d = Screen() d.bgcolor("black") for i in range(6): for colors in ["red","blue","magenta","green","yellow","white"]: circle(100) left(10) color(colors)

Glossary:
from turtle import * : This line says to python to import everything from the turtle module.
pensize : is the size of your pen.
speed : is the speed of the turtle.
d : is a variable that I used.
Screen() : it can be used to change the background color of the turtle.
bgcolor : I used this to change the background color.
for i in range(): : is used to loop something for a certain amount of times.
for colors in ["red","blue","magenta","green","yellow","white"]: : for changing the color of the turtle.
circle : used to make a circle in turtle.
left : used to move left a certain amount of degrees.
color(colors) : changes the color to the colors in ["red","blue","magenta","green","yellow","white"].

Thank You!

Voters
Profile icon
CrystalMaduka
Profile icon
sarahshin00
Profile icon
jasminetily
Profile icon
arunpatel1
Profile icon
CoolPanda123
Comments
hotnewtop
Profile icon
LilyHALTON

Won't work? Any advice?