Let’s have some fun today and draw some shapes in SNAP!
For the purpose of this post, I will use the following 2 blocks in Pen palette:
However, I do encourage you to play around with other blocks as well in this palette and test what they can do.
Let’s start with drawing a line. To do that, all you need is:
Click on the green flag and you will see the line.
Note: If you are choosing the default length of 10 steps, you might not see any line because it is hidden by the sprite itself. Move the sprite around and you will see the line.
Now, let’s use the code we used to draw a line to draw a square. To do that, we need to draw a line and turn our sprite 90 degrees and then draw a line and turn and so on. We need to repeat this for 4 times to make the final script look like:
Challenge: Use the information above and build a triangle.