Learn to Code via Tutorials on Repl.it!

← Back to all posts
How to make a colorful spiral of turtles with turtle stamp.
Alice688 (32)

How to make a spiral of turtles

So this is pretty simple, but you'll need to know python basics first.

If you don't know the language check out this website:

Heres a picture of the final result:


First create a repl with python with turtle.

Then import the turtle and random modules.

import turtle
import random


Make your turtle a turtle shape.


Lift your turtle so it doesn't draw one straight line.



Create a variable for the distance your turtle moves(paces).
Twenty paces is the minimum but you can do more.

paces = 20


Start a loop to repeat the stamping code.
You can repeat any number of times.

for i in range(50):

Assign a random function to a variable called 'random_red' to pick a random red value.
Assign a variable for blue and green as well.

random_red = random.randint(0, 225)
random_blue = random.randint(0, 255)
random_green = random.randint(0, 225)


Set the turtle color as the randomly chosen rgb (red, green, and blue) values.

turtle.color(random_red, random_blue, and random_green)

Now stamp your turtle.



Add more paces
Once again, 3 is the minimum but, you can do more.

paces += 3

Move forward by the new number of paces.


Finally, slightly turn your turtle right as it moves to start spiraling.
Please put the turn as 25, if you put another number it might not become a spiral.



Thats it, you have made a spiral of turtles.
I hope you enjoyed this, if you have any advice please comment.

DynamicSquid (3561)

It's a turtle spiral!!

JosephSanthosh (1181)

This is such an in depth tutorial too!

JosephSanthosh (1181)

Wow! This is pretty cool -- Nice job dude

shashi23 (0)

Awesome one keep it up

k9chelsea2 (646)

also if you use a # in markdown you need to put a whitespace after the # and before the text if thats what you where trying to achieve

k9chelsea2 (646)

also the finish at the end needs a whitespace as well if you where doing the big text thingy