This site is an archive; learn more about 8 years of OpenHatch.

[mpw-staff] Lecture and project outlines

Jessica McKellar jessica.mckellar at gmail.com
Tue Apr 10 00:04:16 UTC 2012


Lecture outline
===========

review Friday material
   - math
   - type()
   - variables
   - strings
   - booleans
   - if/elif/else
   - functions
lists
   - why use them
   - initialization
   - type() review
   - len() review
   - accessing elements
   - adding elements
   - changing elements
   - slicing lists
   - strings are like lists
loops and more flow control: for, while, break
   - for loops
   - range()
   - if statements inside for loops
   - for loops inside for loops
   - while loops
   - infinite loop
   - break
   - if statements inside while loops
   - raw_input
dictionaries
   - why use them, key constraint
   - initialization
   - adding elements
   - accessing elements
   - changing elements
   - keys() and values()
modules
   - why modules
   - len and type are built in
   - imports
   - import random
   - random.randint
   - random.choice
   - ColorWall example
   - state capitals

Where state_capitals.py from
http://mit.edu/jesstess/www/BostonPythonWorkshop5/state_capitals.py is
the grand finale and synthesis of lecture material.

===

Projects
=======

The projects live on GitHub:
* https://github.com/jesstess/TwitterAPI
* https://github.com/jesstess/Wordplay
* https://github.com/jesstess/ColorWall

They are instructor-led, following roughly these outlines:

ColorWall:
1. Review relevant material from lecture (e.g. dictionaries)
2. Go over SolidColorTest and DictionaryTest in effects.py as a class
3. Have students implement RainbowTest

If people finish (3) early, have them tweak existing effects or write
a new one. Example tweaks including:
- changing the hue bounds in Twinkle
- change the math in Checkerboards
- write and customize (e.g. colors) your own message in Message

Twitter:
1. Review relevant material from lecture (e.g. modules and imports)
2. Go over search() and trendingTopics() in twitter_functions.py as a class
3. Have students implement userTweets()

If people finish (3) early, have them implement trendingTweets() or
customize the display of individual tweets displayed by search() (e.g.
display the sender).

Wordplay:
1. Review relevant material from lecture (e.g. for loops)
2. Go over words1.py through words6.py as a class
3. Demo scrabble_cheater.py
4. Have students explore other interesting word properties or play
with scrabble_cheater.py (we've had people start Words With Friends
games and cheat using the script)

===
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openhatch.org/pipermail/mpw-staff/attachments/20120409/1f180ce6/attachment.html>


More information about the mpw-staff mailing list