Python Turtle Hello World: Draw Your First Graphic Fast

Logan Jul 13, 2026

Have you ever wanted to have a little fun with programming, or maybe you're looking to introduce someone new to the world of coding? The classic "Hello, World!" program is the perfect starting point, and we're going to create one using Python's built-in module, turtle. Python's turtle module is a fun way to get started with graphics programming, so it's ideal for beginners.

a cartoon turtle with a speech bubble above it's head and the word hello
a cartoon turtle with a speech bubble above it's head and the word hello

Turtle graphics is a feature of Python that allows you to create simple graphics using a series of commands. By using the turtle module, you can create graphics like drawings and shapes with ease. Let's dive right in and create our "Hello, World!" program.

Python Turtle Drawing Trinket with details on Python!
Python Turtle Drawing Trinket with details on Python!

Setting Up Your Environment

Mainly, you need to ensure that you have Python installed on your system. Python's turtle module is built-in, so it comes pre-installed with Python. If you haven't got Python yet, you can download the latest version from the official website, here.

3. Hello, little turtles! — How to Think Like a Computer Scientist: Learning with Python 3
3. Hello, little turtles! — How to Think Like a Computer Scientist: Learning with Python 3

Once you have Python installed, you're ready to start coding.

Running Your First Turtle Program

Glow Particle Animation (Turtle) Python Animation Coding, Python Turtle, Coding Lessons, Coding Tutorials, Learn Web Development, Learn Computer Coding, Programming Code, Computer Coding, Python Programming
Glow Particle Animation (Turtle) Python Animation Coding, Python Turtle, Coding Lessons, Coding Tutorials, Learn Web Development, Learn Computer Coding, Programming Code, Computer Coding, Python Programming

Let's start by running a simple Python script that uses the turtle module. Create a new Python file, for example, "turtle_hello_world.py". Then, add the following code into it.

```python import turtle # Create a new turtle screen screen = turtle.Screen() # Create a new turtle turtle1 = turtle.Turtle() # Tell the turtle to write "Hello, World!" on the screen turtle1.write("Hello, World!", font=("Arial", 30, "normal")) # Hide the turtle after writing so that only the text remains turtle1.hideturtle() # We keep the window open turtle.done() ```

Next, save the file and run it. To run the program, you can either:

  • Open the file with an IDLE (Integrated DeveLopment Environment) – a generic Python environment that comes with Python. You can run the file by pressing F5.
  • Open a terminal or command prompt, navigate to the directory containing the file, and run it using python3 command i.e, python3 turtle_hello_world.py.
‘HelloWorld’ with Turtle Graphics in Python
‘HelloWorld’ with Turtle Graphics in Python

The output will be a new window with "Hello, World!" written on it.

Understanding the Script

The script begins by importing the turtle module and then creates a new Screen. The Screen is the main background in which turtles will draw. Then, it creates a new turtle named 'turtle1', which is used for drawing or writing. The 'write' function is used to write the text "Hello, World!" on the screen using the turtle 'turtle1'. The 'font' parameter is used to specify the font type, size, and style of the text being written. Finally, the 'hideturtle' function is used to make the turtle disappear, and 'turtle.done()' is used to keep the window open after the program has run.

Python Turtle graphics
Python Turtle graphics

Congratulations, you've just created your first "Hello, World!" program using Python's turtle module!

Learning More with Turtle

an image of a pixellated turtle on a white background
an image of a pixellated turtle on a white background
Looping Lines Can Make Great Patterns in Python Turtle
Looping Lines Can Make Great Patterns in Python Turtle
an image of a computer screen with the text turtle - colorful polygon
an image of a computer screen with the text turtle - colorful polygon
Turtle!
Turtle!
Python program to impress a girl
Python program to impress a girl
Playing with Text in Python Turtle
Playing with Text in Python Turtle
Me when my mum says she's getting me maccas
Me when my mum says she's getting me maccas
tortuga 🐢
tortuga 🐢
Pixel Art
Pixel Art
Python Beginner Project Tutorial - Turtle Racing!
Python Beginner Project Tutorial - Turtle Racing!
a cartoon turtle drawing on a white board with red marker and an easel behind it
a cartoon turtle drawing on a white board with red marker and an easel behind it
a computer screen with an image of a spiral in the middle and text on it
a computer screen with an image of a spiral in the middle and text on it
𝐏𝐞𝐭𝐞 𝐓𝐡𝐞  𝐓𝐮𝐫𝐭𝐥𝐞 𓆉
𝐏𝐞𝐭𝐞 𝐓𝐡𝐞 𝐓𝐮𝐫𝐭𝐥𝐞 𓆉
an image of a black background with purple lines
an image of a black background with purple lines
Download Pixel art illustration Turtle. Pixelated Turtle. Sea turtle coral icon pixelated for the pixel art game and icon for website and video game. old school retro. for free
Download Pixel art illustration Turtle. Pixelated Turtle. Sea turtle coral icon pixelated for the pixel art game and icon for website and video game. old school retro. for free
Beautiful Graphic with Python Turtle 🔥✨
Beautiful Graphic with Python Turtle 🔥✨
Writing First Code in Python (Hello World) - The Engineering Projects
Writing First Code in Python (Hello World) - The Engineering Projects
Turtle Heart
Turtle Heart

Now that you've created your first program, it's time to explore more features of the turtle module.

Drawing Shapes

The turtle module allows you to draw various shapes like squares, triangles, circles, etc. You can use the 'forward', 'left', and 'right' functions to move the turtle forward, turn it left, or turn it right respectively. Try the following script as an example:

```python import turtle # Create a new screen screen = turtle.Screen() # Create a new turtle turtle1 = turtle.Turtle() # Draw a square for _ in range(4): turtle1.forward(100) # Move the turtle forward by 100 units turtle1.right(90) # Turn the turtle right by 90 degrees # Hide the turtle when we're done turtle1.hideturtle() # Keep the window open turtle.done() ```

This script will draw a square on the screen. Try changing the values in the script to see how they affect the drawing.

Customizing the Turtle

The turtle module also allows you to customize your turtles. You can change their color, shape, and even add a shell to them. This can make your graphics more engaging and visually appealing.

Here's a script that changes the turtle's color and shape:

```python import turtle # Create a new screen screen = turtle.Screen() # Create a new turtle turtle1 = turtle.Turtle() # Change the turtle's color turtle1.color("red") # Change the turtle's shape turtle1.shape("turtle") # Draw a square for _ in range(4): turtle1.forward(100) turtle1.right(90) # Hide the turtle when we're done turtle1.hideturtle() # Keep the window open turtle.done() ```

This script creates a new turtle with a red color and a turtle shape, and then draws a square using the turtle.

Unleash your creativity with turtle graphics. You can create amazing artwork using nothing but a few lines of code in Python. Who knows, you might even inspire someone else to get into programming!