[Edu-sig] CP4E

Kirby Urner urnerk at qwest.net
Sat Apr 9 20:39:42 CEST 2005


So I'm thinking more about CP4E and how that might look in the early grades.
What if you're not in math class, not in a CS or preCS class of any kind.
Still, you might get mileage out of Python.

Scenario:  what a lot of kids do in early grades is memorize some states and
capitals.  In the USA, that often involves the 50 states, maybe the odd
protectorate or whatever.  In the EU, I imagine it's similar.  In any case,
geography begets data structures.  We could do this stuff with dictionaries.

Fifth grade assignment:  use Google or other search engine to find some data
file containing 50 US states and their capitals; download to your local
drive; write a Python program to snarf this data into a dictionary.  Write a
short quiz loop to ask yourself the capitals.  Could be sixth grade,
whatever.

The point is:  we're always dealing with alphanumeric data, in structures.
Yes, this is how to introduce XML as well, but I'm not suggesting we should
only care about that.  Python is blessed with VHLL data structures, and
mixing them (a list of dictionaries of tuples) etc. is completely logical --
don't need to get with the Perl references and pointers way of thinking
(because that's how you're thinking anyway).  Indexing into a list with an
integer, or into a mapping with a key word, is what I'd call a "paradigm
academic experience" -- so why not do it in Python?

Following my own advice (5th grade assignment):
http://www.w3.org/2000/10/swap/test/dbork/data/USRegionState.daml 
http://www.infoplease.com/ipa/A0763765.html

As the teacher, I'd probably just parse through either of these to generate
a very simple plaintext version, 2-column e.g.

state capital
state capital
...


Kirby




More information about the Edu-sig mailing list