Previous Lecture Lecture 20

Lecture 20, Thu 06/08

Wrap up / Review

Recorded Lecture: 6_8_23

''' Final Exam Logistics
* The final exam will be in-person Wednesday 6/14 (CHEM 1179)
12pm - 2pm
* Bring a writing utensil and your student ID
* When leaving the room, you must present your ID and hand in your
exam before leaving (it's your ticket out!)
* Please write LEGIBLY (if we can't read it, we won't grade it)
* Closed Book (No notes, book, electronic devices)
* The final wil be cummulative
* Possible types of questions
    * True / False (if false, briefly explain why)
    * Short answers
        * Briefly describe / define / state / ...
    * Given some code, write the output
    * Given some code, state the O-notation
    * Multiple choice
    * Write code satisfying a certain specification (~ 5 - 10 lines
    of code, similar to quiz / homework questions)
    * Given some algorithm we covered, fill in the blank to make it
    work
    * Draw a diagrams
* The exam is designed to take 2 hours. It should be enough time
assuming students prepare and study the material
* Proctors and I will help answer CLARIFYING questions

Topics
* Python Basics
    * Types
        * int, float, boolean, strings, lists, sets, dictionaries, ..
        * conversion functions (int(), float(), str(), ...)
        * Mutable vs. Immutable
    * Relational / Logical operators (==, <, <=, and, or, ...)
    * Python Lists
        * Supporting methods count, pop, ...
    * Under-the-hood functionality of dictionaries vs lists
    * List / String slicing [:]
    * Strings
        * Supporting methods (replace, split, find, ...)
    * Function definitions
    * Control Structures
        * if / else, elif, for, while, ...
* Testing
    * TDD (Test-driven development)
    * pytest
* Python Errors
    * Syntax vs. Runtime errors
* Exceptions
    * Exception types (NameError, TypeError, ZeroDivisionError, ...)
    * Exception handling
        * Try / except / raise
        * Flow of execution
        * Passing exceptions to function caller
        * Catching multiple exceptions
        * Catching inherited type exceptions
        * Defining our own exceptions
* Object Oriented Programming
    * Defining Python classes and methods
    * Class constructors
        * Defining / initializing default parameters
    * Shallow vs. Deep equality
        * Overloading __eq__ method
    * Overloading operators
        * __str__, __add__, __le__, ...
    * Inheritance
        * Know the implementation and inheritance behavior of fields
        / methods and how to override inherited methods
        * Know the pattern on how to construct inherited classes
        * Know the hierarchy of types (how this can affect Exception
        handling)
        * Know how to explicitly call super / base class(es)' methods
* Algorithm Analysis and O-notation
    * Know how to derive the O-notation for various data structures
    and code segments
* Binary Search
    * Search for items in a SORTED list
    * Know implementation and O-notation
* Recursion
    * Understand how recursive algorithms are managed by the call
    stack
    * Able to derive O-notation for various recursive functions
* Linear Data Structures
    * Know the implementations (as covered in textbook/lectures) and
    O-notation for various functionality of data structures
        * Stacks, Queues, Deques, Linked Lists, Ordered Linked Lists
* Sorting Algorithms
    * Know the implementation and O-notation anlysis (best / worst
    case scenarios)
        * Bubble sort (including the optimized), Selection sort,
        insertion sort, merge sort, quick sort
* Trees
    * Terminology
    * know min-heap / max-heap data structure (and underlying list
    representatoin)
    * Binary Trees
        * Know the nodes and references implementation
        * Traversals: pre, in, post order traversals
    * Binary Search Trees
        * Know BST property and how insertion affects the structure
        * Know implementation / O-notation of various BST methods
        (put, get, deletion)
'''