Intro to
Programming
with Python

Fall 2011
course
navigation

nov 1

aside

how one missing var ruined our launch

midterm projects

Continue to practice methodology; please try to follow the rules I've set down:

go over homework

this week: Chapter 11


New syntax: python "dictionary"
passwords = { "guido" : "superman", "bill" : "bluescreen", "santa" : "rudolph.the.red" } print passwords["bill"] for name in passwords.keys(): print "%s : %s" % (name, passwords[name])
Like lists, but
Look at python docs for dictionary methods; try a few out.
Go over text's example : counting words (see attachments)
http://cs.marlboro.edu/ courses/ fall2011/python/ notes/ nov_1
last modified Tuesday November 1 2011 11:09 am EDT

attachments [paper clip]

     name last modified size
   count_words.py Oct 31 2011 11:23 pm 7.64kB [TXT]moby_dick.txt Oct 31 2011 11:23 pm 1.20MB    tiny_word_count.py Nov 1 2011 11:09 am 601B