Draw a Triangle - Turtle-graphics Typing CST Test
Loading…
Draw a Triangle — Turtle-graphics Code
Draws an equilateral triangle using Turtle Graphics.
import turtle
t = turtle.Turtle()
for _ in range(3):
t.forward(150)
t.left(120)
turtle.done()Turtle-graphics Language Guide
Turtle Graphics is a key concept in computer graphics and educational programming, originally popularized by the Logo programming language. It allows users to control a 'turtle' cursor on screen to draw shapes and patterns through movement commands.
Primary Use Cases
- ▸Teaching programming fundamentals
- ▸Exploring mathematical patterns and geometry
- ▸Creating educational animations
- ▸Visualizing algorithms (loops, recursion)
- ▸Fun projects for beginners in coding
Notable Features
- ▸Simple, intuitive drawing commands
- ▸Immediate visual feedback
- ▸Supports loops, recursion, and conditionals
- ▸Cross-platform availability in educational languages
- ▸Can be extended to advanced graphics with libraries
Origin & Creator
Created as part of the Logo programming language by Seymour Papert and colleagues in the late 1960s at MIT, inspired by Papert's work in constructivist learning.
Industrial Note
Turtle Graphics is primarily educational and pedagogical; rarely used in commercial production graphics but often appears in coding tutorials, workshops, and beginner programming courses.