Getting started - turtleArt

Turtle Art is a great way to explore mathematical and programming concepts in a fun and engaging way. This is inspired by LOGO.
Here is an example of image formed by repeating a simple sequence of instruction.

There is no one right answer. The same shape can be made by various approaches.

Visual programming environment ( Sugar Labs)

https://turtle.sugarlabs.org/

A square can be in a visual programming environment in multiple ways.

Making a Square (“Hello world!”)

sq2
sq3
sq1

Making a polygon


Making a multi-color wheel using random block


Text based- programming environment ( python Turtle)

Python (with Turtle) Online Compiler & Interpreter - Replit

A similar square can be implemented in a text-based environment such as python by following a set of commands. python3 has an in-built library for turtle which supports many more features.
sq4

import turtle
t=turtle.Turtle()

t.forward(100)
t.right(90)
t.forward(100)
t.right(90)
t.forward(100)
t.right(90)
t.forward(100)
t.right(90)

The same can be achieved in lesser number of lines

import turtle
t=turtle.Turtle()

for i in range(4):
  t.forward(100)
  t.right(90)

Link to documentation: turtle — Turtle graphics — Python 3.11.4 documentation

9 Likes