Turtle Art in Computer Programming

Upper School students used their Python coding skills to create unique geometric patterns in Computer Programming class.

Students have been learning how to make one or more lines of code repeat multiple times using loops. They then practiced this skill using the Python Turtle Library, which allows users to easily create pictures and shapes on a virtual canvas. In this programming module, a cursor or “turtle” is given commands through code and “draws” by following those commands.

Student works are composed of shapes that are repeated multiple times in different rotations. Teacher Brianna Ifft helps them to understand how loops are essential in programming, offering, “One would have to have a line—or multiple lines—of code for each individual shape, which is a lot of code!” By using loops, the turtle was told to do the same thing multiple times, shortening their code dramatically.

Share in some of the student work and code here, noting that within the code, every time you see for i in range (x): a student is telling the turtle to everything indented number of times.
Back
Francis W. Parker School educates students to think and act with empathy, courage and clarity as responsible citizens and leaders in a diverse democratic society and global community.