Date |
Lecture Topics |
Readings |
Assigned Work |
Week 0 |
Lectures |
- Course introduction
- What is Python?
- What are software libraries?
- Designing and writing larger programs (briefly)
- Launching a Python shell
- Expressions and evaluation
- Types, objects, numbers, and operators
- Variables
- Values have types; variables do not
- Naming conventions
- Statements
- Booleans
- Writing Python scripts
- Printing output and reading input
|
|
|
Week 1 |
Lectures |
- Strings
- Conversions between types
- Conditionality using the
if statement
- Truth testing and "truthiness"
- Repetition using the
while loop
- Ranges
- Iteration using the
for loop
- Abstraction
- Writing functions
- Parameters and arguments
- Type checking and type errors
- Scope and scoping rules
|
|
|
M 9/30 |
|
|
- Lab sections begin meeting today
- Project 0A due 11:59pm
|
F 10/4 |
|
|
|
Week 2 |
Lectures |
- Built-in data structures in Python
- Tuples
- Lists
- Type annotations (briefly)
- Files and the built-in
open function
- Why it's important to close files
- Higher-level file access
- File systems and related modules in Python's standard library
- Paths
- Exceptions and exception handling
try statements
try , except , else , and finally clauses
|
|
|
F 10/11 |
|
|
|
Week 3 |
Lectures |
- Testing
- Categories of test cases
- Automation of testing using the
assert statement
- Recursive data structures
- File systems as a recursive data structure
- Recursive functions
- When recursion is — and is not — appropriate in Python
- Python programs that span multiple files
- Modules and the
import statement
- Namespaces (briefly)
if __name__ == '__main__'
|
|
|
Videos |
- Overview of computer networks (briefly)
- Network input and output
- Some necessary background on how the Internet works
- IP addresses, ports, packets, routers, etc.
- Sockets
- A socket's input and output streams
- Servers and clients
- Using sockets in Python
- Bytes vs. strings (briefly)
- An example Python socket "echo" client
- Using "pseudo-file" objects to treat socket input/output as text
|
|
|
F 10/18 |
|
|
|
Week 4 |
Lectures |
- Namedtuples
- Sets
- Dictionaries
- Network protocols
- The importance of knowing who and what to trust
- Public and protected functions in a module
- Implementing a custom text-based protocol in Python
- More details about
import and multiple modules
- Naming conventions for modules
|
|
|
M 10/21 |
|
|
|
Week 5 |
Lectures |
- Why namedtuples are a limited way to create new kinds of objects
- Classes
- Objects and their attributes
- Constructors, initialization, methods, and the
self parameter
- The difference between method calls and function calls
- Why we specify some parts of a class as public and others as private
- Naming conventions for classes
- More about classes
|
|
|
M 10/28 |
|
|
|
Th 10/31 |
|
|
|
F 11/1 |
|
|
|
Week 6 |
Lectures |
- Duck typing
- Interfaces
- Consistently designing multiple similar classes
- Using objects of multiple similar classes without explicitly knowing their types
- Web APIs
- URLs with query parameters
- URL encoding (briefly)
- JSON (JavaScript Object Notation), and why it matters even if you're not writing JavaScript
- Using Python's standard library to access web APIs
|
|
|
Videos |
- Pushing out the boundaries even further: the web
- URLs
- HTTP
- GET requests
- Writing a Python program that downloads a web page given its URL
- Why standards are so important on the Internet
- Why HTTP is for more than just web browsers
|
|
|
F 11/8 |
|
|
|
Week 7 |
Lectures |
- Objects, references, and id
- Multidimensional data
- Multidimensional list algorithms
- Test-driven development
- Unit tests as a way of improving one's design
- Refactoring (briefly)
- The
unittest module in the Python standard library
- When Python's standard library falls short
- Why we need third-party libraries
- Installing third-party libraries
- Virtual environments
|
|
|
M 11/11 |
- University Holiday: Veterans' Day — NO LABS TODAY
|
|
|
W 11/13 |
|
|
|
F 11/15 |
|
|
|
Week 8 |
Lectures |
- What libraries we might need if we want to implement games
- Writing a visual game in Python
- Getting started with PyGame
- Displays and surfaces
- The game loop
- Events
- Colors
- Drawing and animation
- Clocks
- The "Spots" game, using PyGame
- Models and views
- Keeping model and view code separate
|
|
|
F 11/22 |
|
|
|
Week 9 |
Lectures |
- Handling additional kinds of events
- Using modules and classes to improve our design
- The fractional coordinate system
- Two-way coordinate conversions
- Augmenting our games with additional features
- Two ways of handling keyboard input
- Mixers and generating sound
|
|
|
W 11/27 |
|
|
|
Th 11/28 |
- University Holiday: Thanksgiving — NO LECTURE TODAY
|
|
|
F 11/29 |
- University Holiday: Thanksgiving — NO LABS TODAY
|
|
|
Week 10 |
Lectures |
- Graphical user interfaces
- The
tkinter module in the Python standard library
- Event-based programming
- Creating a window and letting
tkinter manage it
- Widgets
- Behaviors and events
- Buttons, commands, and event handler functions
- Bound methods in Python
- The
grid layout manager
- Model/view separation in a
tkinter application
- Applying test-driven development to a "real" project
- Why model/view separation makes testing better
|
|
|
M 12/2 |
|
|
|
W 12/4 |
|
|
|
F 12/6 |
|
|
|
Finals Week |
Th 12/12 |
- FINAL EXAM: 4:00pm-6:00pm, BS3 1200
|
|
|