You are currently viewing this lesson as a guest.
Lesson 2: Experimenting with Turtle
Completed

Lesson 2: Experimenting with Turtle

Tilted Squares

There is a saying that "practice makes perfect!". It basically means regular exercise of an activity or skill is the way to become proficient in it.

So, let's do several mini-projects (exercises/activities) to apply different Turtle concepts we've learned.

Let's start with drawing tilted squares (one after another).

  • You can experiment with the angles between the individual squares.

  • You can also fill in colors.

  • Basically, you draw a square (and fill in a color), then tilted at a certain angle. And draw another one, and another one, and so on.

Here is an example code:

  • We defined a function that tilts and draws a square.

  • We used a loop for a quick square drawing

  • And we used "begin_fill( )" and "end_fill( )" to make the whole square a particular color

Challenge

Improve the previous code so that the program draws the following pattern:


Did you like this lesson?

(Voting helps us personalize your learning experience!)