Hey, if you would like to become an artist you can draw any shape using different codes. Here I am going to create a program to draw a STAR.
Step 1: The artist has to "move forward by 200 pixels" to draw one line
Step 2: He has to take a "turn to the right by 144 degrees" to draw the next line
Step 3: To complete the program for drawing a star I have to repeat step 1 and step 2 for about 5 times.
Coding to draw the star
Loo at the program below to draw the star.
Instead of writing many lines of codes like I did, we can save time by looping a sequence.
Loops are nothing but repeat blocks which will repeat the code given inside the loop as many number of times we want it to.
The program which I have written above can be made shorter by looping.
Thus by using loops or repeat blocks , I have saved many steps and it is easier for me to do the programming. Try this puzzle and solve it out..
If you're ready to try this, just click on this link https://studio.code.org/s/coursed-2019/stage/8/puzzle/6