[Edu-sig] Recap of 2 Python classes

Kirby Urner urnerk at qwest.net
Fri Dec 2 00:06:34 CET 2005


Quiet around here.

So I did two classes for 8th graders, 7 to go.  One was pre-Thanksgiving and
included some play with Google Earth.  Did you know you can share Places
using XML files (.kml)?  Example:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Placemark>
  <name>Climatron</name>
  <LookAt>
    <longitude>-90.2588032444306</longitude>
    <latitude>38.61412902659804</latitude>
    <range>191.4235683380654</range>
    <tilt>-8.190895111017013e-011</tilt>
    <heading>0.01079095337023216</heading>
  </LookAt>
  <styleUrl>root://styleMaps#default+nicon=0x307+hicon=0x317</styleUrl>
  <Point>
    <coordinates>-90.2588032444306,38.61412902659804,0</coordinates>
  </Point>
</Placemark>
</kml>

Just go File | Open and bring it in (e.g. test.kml).

Anyway, every kid has IDLE going, and the first thing I had them do is ask
for the type of a lot of primitive objects e.g.

>>> type(10)
<type 'int'>
>>> type('cat')
<type 'str'>

Then I dove into collection types (lists, dictionaries and strings).  Shall
we call strings a collection type?  They're a lot like lists, aren't they?

I use the collection types to introduce dot notation.

Kids seem to like the ability to manipulate strings more than anything.
Numbers are maybe too ordinary or less cool in some way.

Next week, we'll be looking at functions for the first time.

Anyway, pretty hum drum.  I'm posting more about math/cs at the Math Forum
than in any Python list, since the concepts are pretty familiar around here.
It's the math teachers who're still somewhat innumerate.

Kirby




More information about the Edu-sig mailing list