# The Envelope Challenge

To complete this challenge, your task is to draw the following envelope without lifting your pen and without going over the same line twice!

Grab a piece of paper and have a go.

Alternatively, you can draw your envelope on this online whiteboard:

#### Python Turtle Challenge

Did you manage to draw the envelop in one continuous line, without visiting any segment twice? If so you are now going to write an algorithm using Python Turtle for the computer to solve this challenge by following the instructions of your algorithm. To do so we will use (x,y) coordinates. The canvas we are drawing on (using Python Turtle) is 400 pixels wide by 400 pixels high. The coordinates (0,0) refers to the centre of the cnavas.

Look at the canvas below to understand how (x,y) coordinates work:

In order to draw on screen, we will use the goto() instruction from the turtle library. This instruction takes two parameters: the x,y coordinates of where the pen should travel to:

`pen.goto(50,150)`

#### Complete the code…

We have started the code for you. Your task is to add a few goto() instructions for the computer to solve the envelope challenge!

Your extension task consists of drawing this diamond shape using Python Turtle. Note that it, is not possible to draw this shape without either lifting up your pen or re-visiting the same segment twice.

Did you like this challenge?

Click on a star to rate it!

Average rating 3.8 / 5. Vote count: 44

No votes so far! Be the first to rate this post.

As you found this challenge interesting...

Follow us on social media!

Tagged with: