Documents
Stern Warning
Any notes found here are intended to supplement your own lecture notes.
They are not a substitute for attending class.
| Lec No. | Topic & Description | PDF link | PPTX link |
|---|---|---|---|
| Lec 01 | Introduction | PowerPoint | |
| (Syllabus, Academic Integrity, Using GL & emacs) | |||
| Lec 02 | Intro to Python | PowerPoint | |
| (Variables, Expressions, Input/Output) | |||
| Lec 03 | Operators | PowerPoint | |
| (Arithmetic, Assignment, Comparison, and Logical Operators) | |||
| Lec 04 | Decision Structures | PowerPoint | |
| (One-Way, Two-Way, and Multi-Way Decision Structures) | |||
| Lec 05 | Algorithmic Thinking | PowerPoint | |
| (Algorithms, Syntax and Logic Errors, Practice with Decision Structures) | |||
| Lec 06 | While Loops | PowerPoint | |
| (while Loops, Interactive Loops, Conditional Practice) | |||
| Lec 07 | Lists | PowerPoint | |
| (Lists, append(), remove(), Sentinel Loops) | |||
| Lec 08 | Strings (and More) | PowerPoint | |
| (String Data Type, Constants, Boolean Flags) | |||
| Lec 09 | Functions | PowerPoint | |
| (All About Functions (Define, Call, Purpose), Variable Scope) | |||
| Lec 10 | Functions (continued) | PowerPoint | |
| (Returning Values, Scope) | |||
| Lec 11 | Program Design | PowerPoint | |
| (Modularity, Top Down Design, Implementation) | |||
| Lec 12 | Tuples | PowerPoint | |
| (Tuples, Casting, Membership "in" Operator) | |||
| Lec 13 | Midterm Review | PowerPoint | |
| (Exam Rules, Exam Format, Exam Content, Exam Advice) | |||
| Lec 14 | Lists (continued) | PowerPoint | |
| (Two-Dimensional Lists, Lists and Functions, Mutability) | |||
| Lec 15 | For Loops | PowerPoint | |
| (Introduction to for Loops, range() Function) | |||
| Lec 16 | File I/O | PowerPoint | |
| (Escape Sequences, File Processing, open(), and Reading from Files) | |||
| Lec 17 | File I/O (continued) | PowerPoint | |
| (Splitting Input into Variables, Writing to Files, and Closing Files) | |||
| Lec 18 | Program Design (continued) | PowerPoint | |
| ("Good Code", Top Down/Bottom Up Design and Implementation) | |||
| Lec 19 | Recursion | PowerPoint | |
| (Recursion, Stacks, Designing Recursive Functions) | |||
| Lec 20 | Recursion (continued) | PowerPoint | |
| (Code Trace of Recursion, More Examples, Iteration vs Recursion) | |||
| Lec 21 | Dictionaries | PowerPoint | |
| (Building, Accessing, and Manipulating Dictionaries, Comparison to Lists) | |||
| Lec 22 | Binary (and More) | PowerPoint | |
| (Binary Numbers, ASCII Values, Short Circuiting) | |||
| Lec 23 | Searching and Sorting | PowerPoint | |
| (Linear/Binary Search and Bubble/Quick/Selection Sort) | |||
| Lec 24 | Algorithmic Analysis | PowerPoint | |
| (Run Time, Worst and Best Case, Asymptotic Analysis, Big O) | |||
| Lec 25 | Classes | PowerPoint | |
| (Object-Oriented Programming, Classes, Inheritance) | |||
| Lec 26 | Python and emacs Fun | PowerPoint | |
| (import, Modules, Random Numbers, Shortcuts) | |||
| Lec 27 | Final Exam Review | PowerPoint | |
| (Exam Rules, Exam Format, Exam Content, Exam Advice) |
Livecoding Files
Below you will find copies of the files we have worked on in class. Brief notes have been provided where appropriate.
| Lecture | Exercise | Links | Notes |
|---|---|---|---|
| Lec 02 | Mad Libs Game | madLibs.py | Game played in class |
| Lec 05 | Are Dogs Good? | dogs.py | Single if/else |
| Lec 05 | Nail Polish | polish.py | Single if/elif/else |
| Lec 05 | Passing 201 |
moveOn1.py moveOn2.py moveOn3.py |
Nested, grade as outer if Nested, major as outer if Not nested, uses and/or |
| Lec 06 | Guessing Polish | guessPolish.py | Uses a while loop to keep guessing |
| Lec 07 | Groceries v2.0 | groceries_v2.py | Uses a sentinel while loop to fill list |
| Lec 08 | Password Creator | validPassword.py | Uses a Boolean flag to meet multiple requirements |
| Lec 08 | Extra Credit Grades | extraCredit.py | Uses a Boolean flag to find one of many possible ways |
| Lec 12 | Tuple Guesses | tupleGuess.py | Uses membership 'in' operator |
| Lec 15 | Kennel Assistants | kennel.py | Uses different for loop styles |
| Lec 17 | deSpacing |
deSpacer1.py deSpacer2.py deSpacer3.py |
Using split and join on one string Using for loop over file as one string Using nested for loops over list of strings |
| Lec 19 | Fibonacci Sequence | fib.py | Uses recursion to generate lower numbers |
| Lec 20 | Recursion Practice | recurPractice.py | Uses recursion in multiple ways |
| Lec 21 | Creating Dictionaries | createDict.py | Creates dictionary from two lists |
| Lec 23 | Binary Search | binarySearch.py | Recursive binary search implementation |
| Lec 25 | Class Implementations | classes.py | Includes inheritance and overriding |