The final exam is worth 200 points. I have not written the final version of this exam yet, but I expect it to be like the midterm in format: about 10 pages (most pagest have multiple parts), each covering about 1 week of material for the 10 week quarter (although there will be no questions on material covered the last week). So, it is cumulative. Over this 120 minute test, that is about 12 minutes per page (to read and answer it). We have covered way too much material for you to re-read everything. I suggest primarily reviewing the quizzes and midterm, and then the programming assignments: not reading them in depth, but being familiar with them and their major themes. Of course you will be analyzing and writing code on the final exam, but I expect there also to be a small number of questions to be answered in English or with pictures/diagrams. I will write in more detail a few days before the exam, after I have written it. I will provide the same kind of material I provided for the midterm. Here is my view of the material that we covered. ------------------------------------------------------------------------------ Week 0) reading files simply standard iteration (and variations with readlines and read) calling rstrip and split a special function for parsing lines Week 1) Review/Extension of Python basics: names, references, objects, rules for how things work picures: illustrating name/object bindings importing: forms and meanings scope: global/local (and eventually enclosing and builtins) functions (1) with functsions as arguments (2) returning functions lambdas: lightweight function objects sequence unpacking ---- sort/sorted: key/reverse, negate trick, stability/multiple-calls function calls: (), argument/parameter binding options, finally *args/**kargs construction on iterable data sharing vs copying ---- comprehensions: list, set, dict, and tuple (special: see generator functions) important functions: split/join, all/any, sum/min/max, zip/enumerate data types: list, tuple/named-tuple, set/frozenset, dict/defaultdict iterators : iterating over sorted/reversed data; 3 ways to iterate over dicts raising exceptions and exception/handling with try/except classes (__dict__ for object name spaces) Week 2) Text Patterns EBNF named rules; right hand sides: sequence, alternatives, choice, repetition proving symbols match rules (in English, etc.); syntax charts synthesizing rules from examples regular expressions elements of the matching language (e.g., what [], {}, |, ?, +, *, etc. mean) re functions: match, search, sub, split, compile specifying/extracting groups (numbered and named) after matching re methods on match objects: mostly group (by number/name) and groupdict Week 3) Classes how state and methods are stored in an object's namespace (using __dict__) the Fundamental Equation of Object Oriented Programming the meaing of _ and __ prefixes in attribute names operator overloading via method definition misc: __init__, __len__, __bool__, __str__/__repr__ unary: +, -, abs relational arithmetic container: __getitem__, __setitem__, __delitem__, __contains__ function call: __call__ iterators: __iter__, __next__ (covred in detail in Week 4) attribute: __getattr__, __setattr__, __delattr__, (ignore __getattribute__) context managers: __enter__, __exit__ Week 4) Iterators how iterators work translating for loops into while loops with explicit calls to iter/next general review of use/illustrations of countdown and prange (how range works) implementation of iterators with simple nested classes generator functions implementation of iterators with generators space efficiency (iterating over many value without storing them all) decorators for iterators using generators: e.g., repeat, unique, filter decorated is an iterable; decorator produces an iterable Week 5) Recursive and Functional Programming recursive programming for standard Python data structures: int, string, list recurring on multiple parameters proof rules and their application to write/prove recursive code correct functional programming with map/filter/reduce (+ lambdas): definition and use accmulation and tail recursion generative recursion: the Minimum Number of Stamps problem decorators for things called special @ syntax examples: Track_Calls, Memoize, Illustrate_Recursive Week 6) Self-referential data types linked lists: pictures, hand-simulation binary trees (mostly binary search trees)/structure trees: pictures/meanings iterative and recursive functions for simple tasks for lists and trees Week 7) Inheritance single inheritence inheriting/using/overriding: state, __init__, other methods big example: modular counters derived from counters multiple inheritance finding attribute names in inheritance hierarchies: attribute resolution order (really a network if multiple inheritance is used) (updating the fundamental equation of object-oriented programmming) handling exceptions using the inheritance hierarachy of exceptions type vs isinstance simple examples: defaultdict, lists indexed at 1, GUI widgets mixin examples: Privacy, general-purpose __str__ Week 8) Analysis of Algorithms complexity classes & Big-O notation: their meaning (doubling signatures) common complexity classes: O(1), O(Log2 N), O(N), O(N Log2 N), O(N**2), ... complexity classes for standard Python operations static analysis of code: code -> complexity empirical analysis of code: timing -> complexity minor: approximating logarithms base 2; knowing 1+2+..+N = N(N+1)/2 Week 9) Tools performance: my Performance class, the standard Python profiler more on empirical analysis: computing the average heights of random binary search trees testing: general testing, unittests (in notes but now not covered/tested) Week 10) No quizzes on these, so they will not appear on the final exam the Python Virtual Machine static vs dynamic type + Infinities in Mathematics and Computing (no quizzes on these, so they will not appear on the final exam)