## Monday, November 24, 2014

### Fun with Polygons (Programming Class 9)

when: Monday morning
where: at school

Reviewing last week assignment

As usual, I started with homework review which is to draw a scary ghost with a bonus point if they can make their ghosts disappear and reappear.  Turned out to be a nice segue into my main agenda this week which is to review the for loop and a little bit of geometry.  I pointed out that their codes could be shorten by using for loops.

Fun with Polygons

Although my main goal for this session was to review for loops, I wanted to throw in a bit of geometry review (have been noticing that the kids were using too much trial and error strategy when they drew non-quadrilateral shapes).  The structure of this session was I asked them to draw various polygons using for loops:
- we started off with the basics: square and equilateral triangle
- Then I asked them to generalize their program to make any polygon.  This requires two things:
1) Understand how to change the number of iterations in the for loops
2) Recognize that the angle for the turtle to turn is 360/n where n is the sides of the polygon.  I showed them Josh's little program to illustrate this fact (http://jgplay.pencilcode.net/edit/explainer/extAngles)
- Next I asked them to use for loops to draw a rectangle.  Here they have to recognize that the input into for loops can be other things than a sequence of natural numbers.

Things to Note (Debate?) for Future Lessons

Up til now, our main teaching approach has been to show them codes, run it to see what happens, and then ask the students to extend the codes.  While this show-don't-tell approach is great at stimulating their creativity and interest in class, my opinion is that our G5 students need a bit more explicit blackboard instructions to get a strong grasp of the concept.  Thus, I think we need a balance between learning by exploration vs. with explicit instructions.