Without being told, I believe that the Coding exercises have moved into Functions. Or, they’re preparing us to apply the concept of Functions in our coding.
A Function is a set of directions that can be called upon over and over. I think of it as perhaps “short-hand”.
In the little picture, just above, are three directions:
- Move forward by 10 pixels
- Turn right by 90 degrees
- Repeat all of this 4 times
This makes the little square shape in the image at the top of this blogpost. This entire little “package” could be called a Function. The package makes a square shape and you can call upon it over and over each time you want to make a square. However, I am guessing that it isn’t strictly a function yet. It will be a function if we bundle it and give it a name. The name should be probably be “Square”. So, we can call upon “Square” every time we wanted a square shape. This stream-lines things so that we can go ahead and think of more complex drawings that incorporate the “Square” inside of it. Look at the image at the top of the blogpost, which is an example of this. There are many littles squares in my drawing.
As I mentioned, I believe we are moving towards Functions by comparing the exercises in this Stage 7 called Artist 2 with those of Stage 5 called Artist. That being said, I am not a computer scientist and Code.org might make me out to be a liar in future lessons. If so, I’ll come back and add a footnote to this blogpost. 😉
I am spatially and directionally-challenged. I found Stage 5 Artist puzzles quite difficult at the end. I understand degrees and angles but I was not always totally sure what direction the Artist was facing. My daughter worked this out by physically walking through the directions herself.
Before I started this Stage 7, I felt pretty daunted by the prospects of drawing in even more complexity. To credit the creators of the puzzles, they have decomposed (broken down) the learning in such small increments that each little puzzle is just slightly more complex than the prior one. I never felt “in over my head”. I got through Stage 7 far faster and easier than Stage 5, ironically.
To finish off this blogpost, please click the first link in my Tweet. You can hit the Orange RUN button to see my program—-with a “triangle”in it—- run…
After the program runs, you can click “How it works” button (under the orange RUN button on the same webpage) and it will open up so you can see my Coding using the blocks.
Can you identify the blocks that make up the Function “Triangle”?
p.s. I’m so glad I can play with colours. If not, I don’t think I would enjoy it half so much. 😉