CS 112 (F '09), Fundamentals of Programming II (Stough)| Lecture | Date | Topics | Assigned / Referenced |
Assignments Due/Comments |
| 0 | F, Sept 11 | syllabus What to expect Brief python review (list, tuple, dict, functions, map, filter, reduce) General Exhaustive Python Reference Some useful Python tutorials Putting python on your computer, some instructions: -Windows: save and run this file. -Mac: disk image here. -Unix: use yumex or synaptic (ubuntu) or whatever package manager, get python and python-tools (optional: iPython, scipy, numpy, PIL) |
Read/review Chs 6, 7, 8 Problem Set 0 |
|
| WEEK
1 |
Chapters 6, 7, 8 -Python review (including recursion) -7.1, 7.2: Graphics -Object-oriented design, Common ops (init, str, cmp, eq) -Abstraction and Abstract Data Types |
|||
| 1 |
M, Sept 14 |
List processing, simple functions, map, filter, reduce OO design introPython.py craps.py (p. 301) |
Problem
Set 1 |
Problem Set 0 due today. |
| T, Sept 15 |
Python coding: listMethods.py (see info on strings and lists, and on manipulating strings) OO: rational.py (complete the definitions, see here) (p. 307) bankAccount.py (complete the class definition) Graphics: turtlegraphics.py ccurve.py (p. 261) |
|
||
| 2 |
W, Sept 16 |
Inheritance,
Polymorphism, inheriting from list people.py vector.py |
|
|
| 3 |
F, Sept 18 |
Object interaction cards.py blackjack.py |
Read Chs 8, 11 |
|
| WEEK
2 |
Chapters 8, 11 -Object-oriented design -Complexity Analysis (Asymptotics, O-notation, Searching, Sorting) |
|||
| 4 |
M, Sept 21 |
Asymptotics (best, worst,
average), O-notation Searching - linear on unsorted, linear on sorted, binary testSearch.py |
Problem
Set 2 -wordScanner.py -inoperative.txt -mary.txt -job.txt |
Problem Set 1 due today. |
| T, Sept 22 |
Finish binary search Sorting A look at PS2. -PS2's WordScanner, implementing __iter__ |
|
||
| 5 |
W, Sept 23 |
Variations on the
computation of Fibonacci numbers fibonacciPrograms.py Efficient Exponentiation Minimum finding, order statistics |
|
|
| 6 |
F, Sept 25 |
Sorting - selection,
insertion, analysis of, profiling sortingProfiling.py Quicksort and mergesort |
Read Chapter 11 Read Sections 12.2-3 Read Section 17.1 |
|
| WEEK
3 |
Chapters 11, 12, 17 -11, 17.1: Recursive Sorting, Complexity Analysis -12.2, 12.3: Documentation and Testing |
|||
| 7 |
M, Sept 28 |
Sorting - quick, merge Documentation and Testing |
Problem
Set 3 |
Problem Set 2 due today. |
| T, Sept 29 |
PS3 work |
|
||
| 8 |
W, Sept 30 |
quicksort, mergesort
analysis O(N) Sorting (!?!) radix.py |
M1
Practice |
Problem Set 3 due today.
|
| 9 |
F, Oct 2 |
review |
|
M1 Practice due IN CLASS |
| WEEK
4 |
Chapter 13 -Collections, Arrays, Linked Lists |
|||
| M, Oct 5 |
Midterm 1 today |
Read Chapter 13 | ||
| 10 |
T, Oct 6 |
M1 review Arrays, Lists (complete the definition) (see here on raising errors) arrays.py |
Problem
Set 4 |
|
| 11 |
W, Oct 7 |
Linked Lists linkedList.py |
||
| 12 |
F, Oct 9 |
Doubly-linked, and
Circular Linked Lists circList.py |
Read Chs 14, 15 | |
| WEEK
5 |
Chapters 14, 15 -Stacks (Implementations, Recursion, Arithmetic Evaluation) -Queues (Implementations, Recursion, Priority Queues) |
|||
| 13 |
M, Oct 12 |
Stacks and Queues,
ADTs (interfaces, functionality), implementation |
Problem
Set 5 -calculator.py |
Problem Set 4 due today. |
| T, Oct 13 |
Stacks - implementation,
applications, analysis stack.py, define copyStack, reverseStack queue.py, define copyQueue, reverseQueue PS5 discussion - arithmetic expression evaluation |
|
||
| 14 |
W, Oct 14 |
Stacks - depth first
search, recursion iterFib.py - emulating recursion with a stack. basically, doing the work recursion does for you. Queues - breadth-first search |
|
|
| F, Oct 16 |
Reading Day |
No Class |
No Class: Reading Day |
|
| WEEK
6 |
Chapters 14, 15 -Stacks cont. -Queues cont. |
|
||
| 15 |
M, Oct 19 |
Queues |
|
Problem Set 5 due today. |
| T, Oct 20 |
linkedStack, listQueue -
comparing stack/queue ADT implementations coinPuzzle.py PS 6 work |
Problem
Set 6 -linkLister.py |
|
|
| 16 |
W, Oct 21 |
Priority Queues priorityQueue.py |
|
|
| 17 |
F, Oct 23 |
Indexed and Positional
Lists |
Read Chapter 16 |
|
| WEEK
7 |
Chapter 16 -Indexed and Positional Lists, Iterators |
|
||
| 18 |
M, Oct 26 |
Doubly, circularly linked
lists dblLinkedList.py Heap storage, disk storage |
|
Problem Set 6 due today. |
| T, Oct 27 |
Doubly linked list
implementation of positional list |
|
|
|
| 19 |
W, Oct 28 |
List sorting | M2 Practice |
|
| 20 |
F, Oct 30 |
review |
|
M2 Practice due IN CLASS |
| WEEK
8 |
Chapter 17 -17.2, 17.3: Recursion (List Processing, Backtracking) |
|||
| M, Nov 2 |
Midterm 2 today |
Read Sections 17.2-3 |
|
|
| 21 |
T, Nov 3 |
Recursive Structures,
list processing recList.py lisplist.py |
||
| 22 |
W, Nov 4 |
Backtracking, Queens
problem tail recursion |
Problem
Set 7 -manyqueens.py |
|
| 23 |
F, Nov 6 |
Recursive decent and
Programming Languages parsers.py Trees |
Read Chapter 18 |
|
| WEEK
9 |
Chapter 18 -Trees (Search Trees, Heaps and Heapsort, Expression Trees) |
|||
| 24 |
M, Nov 9 |
Trees, Binary Trees,
Search Trees binaryTree.py |
Problem
Set 8 -huffman.py -poeLetters.txt |
Problem Set 7 due today. |
| T, Nov 10 |
Binary Search Tree: find,
add, remove binarySearchTree.py PS8 work |
|
||
| 25 |
W, Nov 11 |
Heaps, priority queues
and heapsort heap.py |
||
| 26 |
F, Nov 13 |
red/black, AVL and means
of avoiding unbalanced trees splayTree.py |
Read Chapter 19 |
|
| WEEK 10 |
Chapter 19 -Sets and Dictionaries/Maps -Hashtables, Chained Hashtables |
|||
| 27 |
M, Nov 16 |
List-based Set,
Dict set.py dict.py Hashing |
Problem
Set 9 -names.dic -propernames.dic -manywords.dic |
Problem Set 8 due today. |
| T, Nov 17 |
Efficient Dictionary
Access Hashtables (will want primes.py) PS9 |
|||
| 28 |
W, Nov 18 |
Evaluating hash functions
|
||
| 29 |
F, Nov 20 |
review twentyQuestions.py |
Read Chapter 20 |
Problem Set 9 due Monday. |
| Thanksgiving break 11/23
through
11/27 |
||||
| WEEK 11 |
Chapter 20 -Graphs |
|||
| 30 |
M, Nov 30 |
Graphs, rep's of,
traversals of |
|
|
| T, Dec 1 |
PS10 work Prim's minimum spanning trees Topological graph sort |
Problem
Set 10 -algorithms.py -model.py -view.py -graph.py |
|
|
| 31 |
W, Dec 2 |
Dijkstra's shortest paths | ||
| 32 |
F, Dec 4 |
Finish Graphs More Graph Algorithms |
||
| WEEK 12 |
|
|||
| 33 |
M, Dec 7 |
Image processing images.py flower.png shark.png smokey.jpg imageProcessingIntro.py |
Problem Set 10 due today. |
|
| T, Dec 8 |
Some image processing
fun. |
|||
| 34 |
W, Dec 9 |
What's next... Review |
Practice
Final |
|
| 35 |
F, Dec 11 |
Review |
Pract. Final due IN CLASS |
|
| Final exams from Saturday Dec.
12 at 2PM
through Friday Dec. 18 at 5PM |