Brainstorming a new worksheet for 2006

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Brainstorming a new worksheet for 2006

kirby urner-4
I'll be back to school on Tuesday, teaching another Python class.  I'm about to throw together a web based worksheet for use in class (each student will pull it up in a browser).  I'll be recycling a lot of familiar material.  Just thought I'd brainstorm out loud about the contents, then whip it together, then come back here and share the URL.

I want to review some of what we've done so far, include a lot of links, preview some of the content ahead.

Topics: 
Google Earth, Celestia and Stellarium for orientation (hello world)
Latitude / Longitude
XML
Python: 
   shell mode
   primitive objects vs. collections
Collections:
   list
   dictionary
   string
   tuple
Expressions:
   list comprehensions
Functions:
   getting started with sequences:  triangular, tetrahedral numbers etc.
Generators:
   same ground, different capabilities
   generator expressions
...

That should be enough to get me going.  I'll be back soon with that URL.  It'll be a work in progress and I'll be open to feedback (positive, negative, neutral, indifferent).

Kirby


_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Fwd: Brainstorming a new worksheet for 2006

kirby urner-4
That should be enough to get me going.  I'll be back soon with that URL.  It'll be a work in progress and I'll be open to feedback (positive, negative, neutral, indifferent).

Kirby

===

OK, in about 90 minutes, I got this far:

http://www.4dsolutions.net/ocn/winterhaven/

(of course this page will be changing as time goes on).

I have a few minutes to work on my functions page before I have to go somewhere.  I'll get started on that now.

Kirby


_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Brainstorming a new worksheet for 2006

John Miller-3
In reply to this post by kirby urner-4
kirby urner <[hidden email]> wrote:

> That should be enough to get me going.  I'll be back soon with that  
> URL.
> It'll be a work in progress and I'll be open to feedback (positive,
> negative, neutral, indifferent).
>
> Kirby

One small suggestion. Instead of this:

'''
Examples of data structures are:

list [a, b, c]
dictionary {a:1, b:2, c:3}
string "abc"
tuple (a,b,c)
'''

I suggest this:

'''
Examples of data structures are:

[a, b, c] # a list
{a:1, b:2, c:3} # a dictionary
"abc" # a string
(a,b,c) # a tuple
'''

This cleanly separates the syntax from the labeling, and reinforces  
the commenting notation.

Looking at the larger picture, I'm feeling that there is a need for  
an online place to provide for the teaching/learning of python that  
is specifically structured for high school credit. You may have heard  
that Michigan is thinking of making the completion of an online  
course a graduation requirement. If this passes, and other states  
follow, there might well be demand for such a course, or set of courses.

I really like Kirby's penchant for sharing his educational endeavors  
with us, and the materials that go with them, however, it is all very  
*specific* to his particular situation. I've been wondering if there  
isn't some way to foster greater collaboration with what Kirby is  
doing, while at the same time, engender more such efforts by those of  
us inclined to do so.

For example, one well-regarded, open-source curriculum management  
system is Moodle (moodle.org) (think Blackboard, or WebCT, only  
free.) If we set up a moodle site, we could each prototype courses,  
placing emphasis where each of us felt was appropriate or necessary  
for our own needs, or the perceived needs of a potential audience. We  
might then synthesize our efforts somehow and make it available to  
schools (the horizon gets hazy at this point...)

One drawback, in my mind, is that moodle runs on php rather than  
python, and I wouldn't like the subtle irony of that situation. The  
obvious python product I suppose is plone (plone.org) but that would  
have to be heavily customized to make it more like a courseware  
system than a generic content management system. Or maybe using php  
isn't so bad...

Anyway, just wondering if any others were feeling similarly.

John Miller
_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Brainstorming a new worksheet for 2006

kirby urner-4




I suggest this:

'''
Examples of data structures are:

[a, b, c] # a list
{a:1, b:2, c:3} # a dictionary
"abc" # a string
(a,b,c) # a tuple
'''

Good suggestion, I'll do it.


For example, one well-regarded, open-source curriculum management
system is Moodle ( moodle.org) (think Blackboard, or WebCT, only
free.) If we set up a moodle site, we could each prototype courses,
placing emphasis where each of us felt was appropriate or necessary
for our own needs, or the perceived needs of a potential audience. We
might then synthesize our efforts somehow and make it available to
schools (the horizon gets hazy at this point...)

A faculty guy I work with at the school has likewise suggested Moodle.  I suspect I'll be spreading Python internally to Portland Public more than I'm engaged in out-of-state collaborations, but that's just a guess.  Portland seems receptive to the spin I'm putting on things (the GIS emphasis was on request BTW -- that's why all that Google Earth, latitude/longitude stuff -- already part of the curriculum).

One drawback, in my mind, is that moodle runs on php rather than
python, and I wouldn't like the subtle irony of that situation. The
obvious python product I suppose is plone (plone.org) but that would
have to be heavily customized to make it more like a courseware
system than a generic content management system. Or maybe using php
isn't so bad...

Yeah, we're not trying to only use Python for everything under the sun.  Use whatever tools are available, don't always reinvent the wheel.  I use lots of tools besides Python and am the more powerful for it.

Thanks for the useful feedback (just updated my section on generators to include examples of two:  one for Pascal's Triangle, another for Fibonaccis, both integral in my DM/CS hybrid).

Kirby


_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Brainstorming a new worksheet for 2006

Scott David Daniels
In reply to this post by kirby urner-4
kirby urner wrote:
> ...
> Python:
>    shell mode
>    primitive objects vs. collections
> Collections:
>    list
>    dictionary
>    string
>    tuple

'd move string out of Collections.  It cannot have elements of a
different type (there is no character type), nor is it mutable.
Better to be more standard and not call it a collection.  Later
you can say it behaves in some ways like an ordered list of the
individual characters in the string.

--Scott David Daniels
[hidden email]

_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: Brainstorming a new worksheet for 2006

kirby urner-4

I think because strings are considered *sequences* that they're also legitimately *collections*. http://docs.python.org/lib/typesseq.html 

i.e. it's hard for me to think an object called a "sequence" wouldn't also be a "collection" (though not all collections are sequences).

's' is a sequence with one element.

iter is supposed to take a "collection" as its argument, and strings may be fed to iter.

>>> s = iter('a')
>>> s.next()
'a'

Another author who lumps strings with lists as collections is Dave Kuhlman in Python 101: "Collections are things like strings (arrays of characters), lists, tuples, and dictionaries."  http://www.rexx.com/~dkuhlman/python_101/python_101.html

Given there's no formal "collection interface" like in Java (a list of methods any collection must support), I suppose the concept is a little hazy around the edges in Python world.  "Iterable" is perhaps better defined?

SmallTalk definitely considers strings under the umbrella of collections.

Currently the page reads:

"""
Our first practice sessions involved using Python's primitive objects, such as different types of number, plus characters. Then we started looking at collection types, which are designed to organize information in easy-to-use data structures.

Examples of data structures are:

[a, b, c] # list
{a :1, b :2, c :3} # dictionary
"abc" # string
(a, b, c) # tuple

Using data structures, we're able to save a lot of information in a ready-to-use form.
"""

It's a little ambiguous, in that I use the word 'character' but as you point out, there's no 'character' type as distinct from 'string' in Python. 

However, given the 8th grade audience, I think the important thing is just to get letters mixed in with numbers when we speak of 'types of object' (they're used to the idea of integers versus floats, plus one kid brought up complex -- so then we have letters too, and all the stuff you might do with 'em).

...I may reword.  Keep those suggestions coming -- useful thinking on my end.

Kirby

On 1/1/06, Scott David Daniels <[hidden email]> wrote:
kirby urner wrote:
> ...
> Python:
>    shell mode
>    primitive objects vs. collections
> Collections:
>    list
>    dictionary
>    string
>    tuple

'd move string out of Collections.  It cannot have elements of a
different type (there is no character type), nor is it mutable.
Better to be more standard and not call it a collection.  Later
you can say it behaves in some ways like an ordered list of the
individual characters in the string.

--Scott David Daniels
[hidden email]

_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig


_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig