Python First: Free access for educators
I have published online a new 'Introduction to Computing with Python' study pack. This 'Python First' digital pack is intended for students with little or no prior programming experience. This digital pack is all-in-one solution. Ten self-contained online chapters consist of e-texts (66,000 words), 730 slides, 62 labs (36,000 words), 58 sample programs, and 10 quizzes (280 questions). An experienced instructor can start teaching within minutes of logging on to StudyPack.com for the first time. If you are an educator and are interested in the potential of Python, you can explore the 'Python First' digital pack at http://studypack.com/. To gain free personal access, open an account and use enrollment key 31415. More detailed instructions of how to enroll are posted here: http://studypack.com/comp/mod/resource/view.php?inpopup=true&id=1915. The following resources of interest to educators are available under the main menu of http://studypack.com. 1. 'Python First' Features http://studypack.com/comp/mod/resource/view.php?inpopup=true&id=2923 The 'Python First' pack is lab-based, paperless, and low-cost for students. This is more than a book, a digital pack to support blended courses for the net generation of students. 2. Student Surveys http://studypack.com/comp/mod/resource/view.php?id=2837 A recent student survey indicates that students like and prefer Python as a first language. Students also perceive the online study pack as very beneficial. Browse the posted survey results for details. 3. Questions and Answers http://studypack.com/comp/mod/glossary/view.php?id=2838 How a Python study pack is supposed to be used to support a course? Answers to this and other questions are provided in the Questions and Answers resource. 4. A tuition-free summer workshop for educators http://studypack.com/comp/mod/resource/view.php?inpopup=true&id=1916 A tuition-free Python workshop for educators will be held this June at Chapman University in Orange, California. Preliminary versions of the 'Python First' pack have been used by me and my colleagues at Chapman University in California since 2004. The pack will be used in other schools starting this fall. I will be happy to answer any questions or provide additional information. Respectfully, Atanas Radenski mailto:radenski@chapman.edu http://www.chapman.edu/~radenski/
Cool, I'm in. Checking out your moodle. Another way people write switch: def switch(choice): if 0<choice<len(functions):
Dang, got away from me, anyway, like: def switch(choice, functions = [cf0, cf1, cf2, cf3]) if 0<choice<len(functions): return functions [ choice ] # functions is a list of function objects else: print "Not valid" return variations on that theme, i.e. not a big if, elif, elif, else -- just use choice as an index into a list of functions. Kirby On 3/8/06, kirby urner <kirby.urner@gmail.com> wrote:
Cool, I'm in. Checking out your moodle.
Another way people write switch:
def switch(choice): if 0<choice<len(functions):
should we really be showing folks using a mutable object as a default argument? ;-)
That was purely pathological on my part -- I was writing quirky "get the idea across" code, not "put this in a text book and publish it" code.
i'd suggest: (1) changing it to a tuple, or (2) None and figure it out after that.
Might not be a function at all, just embedded code, since you often don't need but one or two switch statements if any. Just some embedded try-except syntax might suffice. I tend not to use them much (switches), in part because I don't write 1970s-style via-menu i/o loops so much as just import the tools I need from a namespace and use them directly, i.e. the "switch" statement is behind my eyes (one might say)). That's how I expect others to use my modules as well -- no "switch" need apply.
cheers, -wesley
Kirby
Kirby:
I tend not to use them much (switches), in part because I don't write 1970s-style via-menu i/o loops so much as just import the tools I need from a namespace and use them directly, i.e. the "switch" statement is behind my eyes (one might say)). That's how I expect others to use my modules as well -- no "switch" need apply.
For an example of this approach, check out this recent thread on the Math Forum. Some teachers were concerned about finding the center of volume of a tetrahedron with simple 3-tuple coordinates (all ones and zeros). I show up with my Python interpreter and start operating a Vector type as I point to relevant off-screen diagrams and little-known math facts, involving the fractions 1/3 and 1/4. It's really a math lecture, with Python interleaved with the chalk and pretty much replacing the calculator. Like J or APL, it's another notation for learning math in. This is what I call Pythonic Mathematics. http://mathforum.org/kb/thread.jspa?threadID=1343350 Kirby
On 3/8/06, w chun <wescpy@gmail.com> wrote:
def switch(choice, functions = [cf0, cf1, cf2, cf3])
should we really be showing folks using a mutable object as a default argument? ;-)
i'd suggest: (1) changing it to a tuple, or (2) None and figure it out after that.
I prefer dicts for this sort of thing. That way "choice" could be something meaningful. For example, I recently wrote a python script showing how different sorting algorithms work (for my discrete math class). I have a dict of algorithms, something like (I'm typing from memory before my first cup of coffee - go gentle on me): algs = {'quick':quicksort, 'merge':mergesort, "insert": insertionsort} choice = "quick" # however we get the choice..eg from the command line. if choice in algs: choice(datatosort) ... I really like not having to remember order. This way, I get the right function easily. And I can print out the list of keys to remind me which functions are available. Anna
I also was thinking thinking of using a dictionary, for pretty much the same reasons. +1 Vern Anna Ravenscroft wrote:
On 3/8/06, *w chun* <wescpy@gmail.com <mailto:wescpy@gmail.com>> wrote:
> def switch(choice, functions = [cf0, cf1, cf2, cf3])
should we really be showing folks using a mutable object as a default argument? ;-)
i'd suggest: (1) changing it to a tuple, or (2) None and figure it out after that.
I prefer dicts for this sort of thing. That way "choice" could be something meaningful. For example, I recently wrote a python script showing how different sorting algorithms work (for my discrete math class). I have a dict of algorithms, something like (I'm typing from memory before my first cup of coffee - go gentle on me):
algs = {'quick':quicksort, 'merge':mergesort, "insert": insertionsort} choice = "quick" # however we get the choice..eg from the command line. if choice in algs: choice(datatosort) ...
I really like not having to remember order. This way, I get the right function easily. And I can print out the list of keys to remind me which functions are available.
Anna
------------------------------------------------------------------------
_______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
-- This time for sure! -Bullwinkle J. Moose ----------------------------- Vern Ceder, Director of Technology Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 vceder@canterburyschool.org; 260-436-0746; FAX: 260-436-5137
participants (5)
-
Anna Ravenscroft -
Atanas Radenski -
kirby urner -
Vern Ceder -
w chun