Create a simple Animation using Turtle in Python Last Updated : 12 Jul, 2025 Comments Improve Suggest changes Like Article Like Report Turtle is a built-in Python module that provides a simple way to draw and create graphics using a virtual turtle on the screen. You can control the turtle using commands like forward() and right() to move it around and draw shapes. In this article, we'll use Turtle to create a fun animation where multiple turtles race on a track. Let's understand the steps to achieve this.Import modules: from turtle import * and from random import randintDraw the race track using a classic turtle.Create four turtle racers – each with different colors and names.Place them at the starting line.Add a fun spin animation before the race begins.Start the race using a loop and random speeds for each turtle.Below is the implementation: Python from turtle import * from random import randint # Draw the racing track speed(0) penup() goto(-140, 140) for step in range(15): write(step, align='center') right(90) for dash in range(8): penup() forward(10) pendown() forward(10) penup() backward(160) left(90) forward(20) # Create turtle racers colors = ['red', 'blue', 'green', 'orange'] y_positions = [100, 70, 40, 10] players = [] for i in range(4): racer = Turtle() racer.color(colors[i]) racer.shape('turtle') racer.penup() racer.goto(-160, y_positions[i]) racer.pendown() # Little spin before race for turn in range(36): racer.right(10) players.append(racer) # Start the race for move in range(100): for turtle in players: turtle.forward(randint(1, 5)) OutputOutputExplanation:Set the turtle's speed to the fastest so the race track draws quickly.Move the turtle to the top-left corner of the screen to start drawing.Draw 15 vertical lines to create the race track, numbering each one.Each line has dashed marks to look like lanes on a track.After drawing each line, the turtle shifts right to draw the next one.Make a list of four different colors for the racing turtles.Set different vertical positions so each turtle has its own track lane.Create four uniquely colored turtles, position them in separate lanes at the start and spin each once before the race.Start the race with 100 loops, moving each turtle forward randomly to make it unpredictable.Related Articles:Turtle Programming in Pythonturtle.right() method in Pythonturtle.forward() method in Python-Turtle Comment More infoAdvertise with us G geeksforgeeks user Follow Improve Article Tags : Python Python-turtle Practice Tags : python Explore Python FundamentalsPython Introduction 3 min read Input and Output in Python 4 min read Python Variables 6 min read Python Operators 5 min read Python Keywords 2 min read Python Data Types 8 min read Conditional Statements in Python 3 min read Loops in Python - For, While and Nested Loops 7 min read Python Functions 8 min read Recursion in Python 6 min read Python Lambda Functions 6 min read Python Data StructuresPython String 6 min read Python Lists 6 min read Python Tuples 6 min read Dictionaries in Python 7 min read Python Sets 10 min read Python Arrays 9 min read List Comprehension in Python 4 min read Advanced PythonPython OOP Concepts 11 min read Python Exception Handling 6 min read File Handling in Python 4 min read Python Database Tutorial 4 min read Python MongoDB Tutorial 2 min read Python MySQL 9 min read Python Packages 12 min read Python Modules 7 min read Python DSA Libraries 15 min read List of Python GUI Library and Packages 11 min read Data Science with PythonNumPy Tutorial - Python Library 3 min read Pandas Tutorial 6 min read Matplotlib Tutorial 5 min read Python Seaborn Tutorial 15+ min read StatsModel Library- Tutorial 4 min read Learning Model Building in Scikit-learn 8 min read TensorFlow Tutorial 2 min read PyTorch Tutorial 7 min read Web Development with PythonFlask Tutorial 8 min read Django Tutorial | Learn Django Framework 10 min read Django ORM - Inserting, Updating & Deleting Data 4 min read Templating With Jinja2 in Flask 6 min read Django Templates 7 min read Python | Build a REST API using Flask 3 min read How to Create a basic API using Django Rest Framework ? 4 min read Python PracticePython Quiz 3 min read Python Coding Practice 1 min read Python Interview Questions and Answers 15+ min read Like