Monday, December 30, 2013

Lesson 44 - Pentagram

Today we started with some math. The task was to calculate the correct angle for drawing a pentagram, where the you turn around 720 degrees, i.e. two full circles. So we calculated 360 * 2 and then divided it by 5 to factor in the 5 vertices of the pentagram. It proved non-trivial to write and read numbers in the range of 0..1000, so we did some practise on that too.

Then we wrote the program on paper first and I drew the pentagram for her there, simulating the Turtle Roy environment with pen and paper. So, here's her sketch.



She remembered that you use sequence or s to do things sequentially and that you have to put the things into a list. She didn't remember the repeat or r function that is used to repeat things. I explained her that you have to wrap the repeated things in parentheses and she drew huge parentheses around the sequence. Will she remember that later? Will see.

At first she was not very enthusiastic and was very slow and sleepy. But she picked up speed quite quickly and in the end she wrote the program to Turtle Roy all by herself, copying it from the paper sketch.

Right now she's teaching mom the same things. She really enjoys teaching people so this is good. And they both learn coding from each other. Win-win.

Using pen and paper first feels good. Will use more often.




Oh and meanwhile the younger girl had painted herself a dark brown Hitler moustache.

2 comments:

  1. *"So we calculated 720 * 2 and then divided it by 5" > "360 * 2"

    ReplyDelete