[Edu-sig] python tutoring

kirby urner kirby.urner at gmail.com
Sun Nov 7 04:43:46 CET 2010

I experimented with doing another one-on-one tutoring in Python,
of a 12 year old boy, right here at the Blue House (what we call
it).  The mom came along too (she knows me already).

Noah is clearly a fast learner.  At 12, he's acing 10th grade
algebra.  He told me he's already studied Java some and was
eager to dive into recursion immediately.

Speaking of recursion, search on that in Google.  It'll ask you:
did you mean recursion?  Hah hah.  Also search on "anagram"
and "ascii art" (actually, that latter only seems to work using
the search box in the top right on my browser, hmmm.

The main innovation here was how I set up the class room.
My laptop was projected to the wall, duplicating what I had
on my screen.  His laptop (property of Holden Web) powered
a VGA flatscreen on the table, duplicating what was on his
laptop screen.

This way I could see what he was seeing and he could see
what I was seeing, even though we sat facing each other
(mom did some knitting on the couch).  I also had speakers
hooked up to the projecting laptop, which turned out to]
be important.

The mom, a knitter, wanted to start things off right with a
funny cartoon she'd found.[1]  I followed up with one of my
own cartoons made with the same framework.[2]

I think it's a good idea to take breaks now and then and
look at short video clips.  On the topic of recursion he
wanted to talk about the Tower of Hanoi.  We watched
a stack of 10 being moved, with a move counter.  Noah
predicted exactly how many moves it would take.  It
took a few more than the 1023 he predicted, but then
a blurb came up saying a few extra moves had been
made.[3]  He felt very vindicated.

We also talked about that fable about the king wanting
a favor, which some guy said he'd do if only he could
get paid in rice, 1 grain on the 1st square of a chess
board, 2 grains on the next, then 4, 8, 16... doubling
each time up to all 64 squares.  The king thought that
sounded quite reasonable, but it was something of a
trick wasn't it?  Anyway, you've probably heard this
all before.

What Noah somehow already knew, is that
2**0 + 2**1 + 2**2 + ... + 2**63 == 2**64 - 1.
i.e. SIGMA (i == 0..j) 2**i == 2**(j+1) - 1.

Here's some Python to check that:

>>> 2**64 - 1 == sum([2**n for n in range(64)])

I'm guessing his answer for the Tower of Hanoi
(10 disks) was right too.  Yep.[4]


[1]  actually, hers was pretty tame, involved knitting.
Now I see this is a whole genre, some of them
rather off color.

[2] http://www.youtube.com/watch?v=p698mXuHmTs
Yeah, a little creepy.  I offer some analysis here:

[3]  http://www.youtube.com/watch?v=D-bE-wmZy0w
(we skipped to near the end after awhile -- somewhat repetitive)

[4] http://mathforum.org/dr.math/faq/faq.tower.hanoi.html
>>> 2**10 - 1

See also:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/edu-sig/attachments/20101106/3760454e/attachment-0001.html>

More information about the Edu-sig mailing list