Getting started - turtleArt

Getting started - turtleArt
0

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.
For example, square can be in a visual programming environment in multiple ways.

Visual programming environment ( Sugar Labs)

https://turtle.sugarlabs.org/

sq2
sq3
sq1

Text based- programming environment ( python Turtle)

https://repl.it/languages/python_turtle

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.8.3 documentation

8 Likes