Stage 7: Artist 2—Drawing using Functions

Drawing with Functions

Drawing with Functions


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”.

Square Function

Square Function


In the little picture, just above, are three directions:

  1. Move forward by 10 pixels
  2. Turn right by 90 degrees
  3. 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 might make me out to be a liar in future lessons.  If so, I’ll come back and add a footnote to this blogpost. 😉


In Javascript

In Javascript


The above are the directions in Javascript.  I can’t tell where the Function is, if it’s actually in the Javascript.   How we’ll transition from the blocks to this goobily-gook?— I have no idea!

Artist 2, Stage 7

The function is the triangle


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. 😉

About Vivian

Vivian @ChezVivian is a Canadian-born Chinese, currently living in Switzerland. She has also lived in Hong Kong and Indonesia. She holds a M.S. (focus: Educational Technology Integration), B.Ed and a B.A. and graduate studies in Kodály and Orff music pedagogy. She is an elementary school classroom generalist, but has also taught as a music specialist, ESL/EAL and also in Learning Support. Most of her teaching career was in International Schools in Hong Kong. She is excited about the IBPYP and the possibilities of using technology to Inquire. Recently, she has been looking at the opportunities that computer programming gives to put #TECHXture back into the hands of children. In other words, technology need not be just about looking at screens. It can be about building things with our hands; and computer programming levels-up what children can do with the things they build---encouraging higher thinking skills. She is a Coetail Post-graduate Certificate grad ('13-'14), a former Coetail Coach and one of the co-founders of #CoetailChat. Her blog home curates her assignments for Coetail and her M.S. graduate studies about Educational Technology integration and anything else educationally-related that she feels inspired to write about. Her twitter tagline sums it up: "Mom to 4, Mentor, Educator, Musician (in that order)".
This entry was posted in 20 Hours of Code, Coding, Course 5- Putting Pedagogy into Practice, Digital Literacy and tagged , , , , , , . Bookmark the permalink.

Comments are closed.