How To Make A Triangle In Turtle Academy

4 min read

How to Make a Triangle in Turtle Academy: A Complete Beginner's Guide

Learning how to make a triangle in Turtle Academy is one of the best first steps for anyone new to programming. But this simple shape teaches you the core ideas behind coding, such as giving commands, understanding angles, and using loops, all while producing a satisfying visual result. So in this guide, you will learn exactly what Turtle Academy is, which commands you need, the geometry behind the shape, and how to draw not just one triangle but several variations. By the end, you will be able to create triangles confidently and understand why the code works Worth knowing..

What Is Turtle Academy?

Turtle Academy is a free, browser-based learning platform that teaches programming through turtle graphics. Plus, the idea comes from the classic Logo programming language, where a small turtle moves around the screen following your instructions and leaves a trail behind it. Instead of typing abstract code that prints text, you give the turtle movement commands and watch shapes appear instantly.

This visual feedback makes Turtle Academy especially popular in classrooms and among young learners. When you tell the turtle to move forward or turn, you immediately see the result, which helps you connect commands to outcomes. That connection is exactly what you will use to draw a triangle Simple as that..

Quick note before moving on.

Understanding the Basic Turtle Commands

Before drawing a triangle, you need to know a few fundamental commands. These are short words (or abbreviations) that tell the turtle what to do:

  • forward (or fd) — moves the turtle forward by a set number of steps.
  • right (or rt) — turns the turtle clockwise by a given number of degrees.
  • left (or lt) — turns the turtle counterclockwise by a given number of degrees.
  • repeat — runs a block of commands multiple times, saving you from writing the same lines over and over.
  • clearscreen (or cs) — erases everything and resets the turtle to its starting position.

Each command is typed on its own line, and the turtle executes them from top to bottom. To give you an idea, forward 100 moves the turtle 100 steps ahead, while right 90 rotates it 90 degrees to the right.

The Geometry Behind a Triangle

Here is the part that trips up many beginners: to draw a triangle, the turtle does not turn by the triangle's inside angle. Instead, it turns by the exterior angle The details matter here. Worth knowing..

An equilateral triangle has three equal sides and three equal inside angles of 60 degrees each. Still, when the turtle reaches a corner, it must turn so that it faces the direction of the next side. That turn is the exterior angle, calculated as:

180 − 60 = 120 degrees

So at every corner, the turtle turns 120 degrees, not 60. Think about it: understanding this single idea is the key to drawing any polygon correctly. If you ever get a strange star shape instead of a triangle, this is almost always the reason.

Step-by-Step: Drawing Your First Triangle

Let's build a triangle one command at a time. Open Turtle Academy, and type the following:

forward 100
right 120
forward 100
right 120
forward 100
right 120

Here is what happens line by line:

  1. The turtle moves forward 100 steps, drawing the first side.
  2. It turns 120 degrees to the right.
  3. It moves forward again, drawing the second side.
  4. It turns another 120 degrees.
  5. It draws the third and final side.
  6. It turns 120 degrees one last time to return to its original facing direction.

Press the run button, and a perfect equilateral triangle appears on your screen. Notice that the final turn is not strictly needed to complete the shape, but it resets the turtle so it points the same way it started, which is useful if you plan to draw more shapes afterward.

Making It Simpler with Loops

Writing the same two commands three times works, but it is repetitive. Programmers solve this with a loop. The repeat command lets you run a block of instructions multiple times That alone is useful..

repeat 3 [forward 100 right 120]

This tells the turtle: "Repeat the following three times: move forward 100, then turn right 120." The result is identical, but the code is shorter and easier to read. Learning to spot patterns like this is a genuine programming skill, and triangles are the perfect place to practice it.

You can also change the size easily. Want a bigger triangle? Increase the number after forward, like this:

repeat 3 [forward 200 right 120]

Drawing Different Types of Triangles

Once you understand the equilateral triangle, you can experiment with other types by changing the angles and side lengths That's the part that actually makes a difference..

Isosceles Triangle

An isosceles triangle has two equal sides. You can draw one by using two different turn angles:

forward 120
right 130
forward 120
right 100
forward 100
right 130

The exact angles depend on the shape you want, so feel free to adjust the numbers and watch how the figure changes.

Right Triangle

A right triangle contains one 90-degree corner. A simple version looks like this:

forward 150
right 90
forward 100
right 135
forward 180
right
Just Finished

Hot Topics

Fits Well With This

Neighboring Articles

Thank you for reading about How To Make A Triangle In Turtle Academy. We hope the information has been useful. Feel free to contact us if you have any questions. See you next time — don't forget to bookmark!
⌂ Back to Home