Calendar - Subject to change!
So Who uses Python Anyway?
- Yahoo! Launches Python Developer Center
- Great article on O'Reilly's website
- Excellent Usenix article
- Industrial Light + Magic
- Walt Disney Feature Animation
- Blender 3D modeling
- Yahoo
- Lawrence Livermore Labs
- Red Hat
- NASA
- National Weather Service
- YOU DO!
References
- How to Think Like a Computer Scientist <--- our online textbook!
- Python.org's Python Tutorial
- python.org
- Dive into Python book (another handy reference)
- List of Python Modules (take a peek at the math module)
- keywords vs. identifiers
- Software:
- python/IDLE for windows
- python/IDLE for Mac python/IDLE for Macs. Click on "an installer for the latest version, but then pick packages for version 2.4. Don't worry about all the packages listed.
Week 1:
- Course Syllabus
- Great article on O'Reilly's website
- Excellent Usenix article
- Read chapter 1 - How to Think Like a Computer Scientist (thinkCSpy)
- Playing around in the interpretive "shell"
- Script to convert Fahrenheit to Celsius
- Script to calculate hypotenuse
- Better script to calculate hypotenuse (has user input)
Week 2:
- Notes about print formatting
- Script to calculate area of circle (with user input)
- Read chapter 2 (How to think like a computer scientist)
- List of Python Modules (take a peek at the math module)
- keywords vs. identifiers
- Notes about variables, operators, etc
- more notes: printing, commenting, operator precedence, quoting, etc
- day 4 python shell
- a script for converting to radians
- function radian written two ways
- See section 11.2 (although this about writing to files, it still has good examples of the string formatting.) for some more print formatting examples
- script to print an E e.py
- Chapter 3 (thinkCSpy)
- celsius_module.py - celsius converter written as a function
- Chapter 4 (thinkCSpy)
- tickets.py
- ticketsBetter.py
Week 3:
- introduction to recursion
- week2-day3.txt - to and from binary (base 2 numbers)
- more operator precedence
- Read chapters 4 & 5 (How to think like a computer scientist)
- factorial2008.py using mathematical recursion! and printing stars recursively
- A recursive game of High Low
- craps.py using random and recursion!
- How to make a menu driven list of choices for the user recursively
- notes-ch5.txt (some reasons for writing functions)
- Using try/except to prevent problems
- While loop - read chapter 6
- while2008.py (cookie intro)
- while.txt
- while.py - using a while loop to repeat (triangle, etc)
- factorialWhile.py
- whilePrompting.py program that loops on a menu
Week 4:
- Read chapter 7 - Intro to Strings
- notes-ch7.txt
- Strings code notes
- some string notes/code
- How can we decide if a word is a palindrome? (Um, first, what is a palindrome?) (two palindrome algorithms - working with Strings)
- How can we reverse some text?
- Recursive way
- With a while loop? 1) using the indices or 2) slicing
- Using a trick way
- String class
- ...
- Incremental development and planning what you will code: designing an algorithm
- Our rough scrambled word algorithm and then the resultant scrambled word game.
Week 5:
- Chapter 9 - sequences, range, for loops
- for loop
- arrays2.py - average a list
- Monte Carlo Pi Approx. with for loop
- handy chart of some string (or any *sequence*) operations
- handy chart of sequence/array operations (will not work on strings!)
- range function to generate a sequence
- the for loop is very handy to iterate through a sequence
(list) of things.
- rarely it will be through a literal sequence of things like ["apple", "orange", "banana"]
- often it could be through a list of numbers generated by the range function
- quiz yourself over for loops and range and answers
- averaging numbers in a sequence
Week 6:
- plain minimum
- index of minimum
- more index of minimum
- converting a list of Fahrenheit temps to a list of Celsius temps
- find, findAll, and help making a test array
- binary search
- binary search runs
- Ch 11.9 List Comprehensions
- temperatures.pyconverting an array of temperatures to Celsius 3 different ways: 1) do it yourself, 2) map, 3) list comprehension
- PRACTICE with map, filter, and list comprehensions
- List comprehensions
- List comprehensions code
- Histograms and frequencies!
- Chap 12: Dictionaries (also known as hashtables.)
- Dive into Python online book - dictionaries
- translation.py - using a dictionary to help translate text into Spanish
- frequency.py - using a dictionary to keep track of the frequency of tests scores.
Week 7:
- for loop could even go through a sequence which has a list of your files and folders! (os module and listdir in action!)
- listdir function from os module
- join, isfile, isdir functions from os.path
- listdir.py
- makeHTML.py
- Writing to a file
- readFile.py
- words.txt
- grabTemperature.py
Week 8:
- What if someone does type a bad path? Check try/except
- Generating HTML and writing to a file
- readData2D.py - didn't talk about this one in class
- readTimeFromURL.py
- yahooTemperature.py
Week 9:
- 2-D arrays
- averaging with 2-d arrays
- working with 2-d arrays - did not talk about this one in class.
- Searching and sorting
Week 10:
- Ch 11.7 exceptions
- Python tutorial 8.3: Handling Exceptions (don't worry about else or finally)
- Exception handling: exceptions.py
- exceptionAverage.py
- Object oriented programming (but chap 14 is where it gets good)
- Dog.py
- OOCard.py
- whoGoes.py
- Dice.py