Course Schedule

[Note: this webpage last modified Wednesday, 19-Dec-2012 10:27:34 EST]

This web-page will be kept up to date with the required reading to perform before each lecture.

Things we will do: We will cover most of the book Think Python and some material not in the book. We will roughly follow the order of the book and will insert some of the following extra material into our schedule when appropriate.

Readings/Topics Schedule

Here I will post the readings and perhaps some brief descriptions of what is covered each day in class. Readings are from Think Python unless noted otherwise.

WeekReading Topics
Aug 21, 23

Ch. 1, 2

Installing Python, what is a program/algorithm, parts of a computer, goals of programming/CS, beginning to program in Python. Variable - how they work, what they are.

To do: download and install Python and either FileZilla or WinSCP, upload files to CS server (see assignments page).

To do: right-click to save each of the following - higherlower.py, crypto.py, snowflake.py. Open Python IDLE (on Windows, click Start / Programs / Python 2.7 / IDLE). With IDLE open, click File, then Open, then choose one of the files. Click Run, then Run Module. Do that for each of the files.

Terms to know: program, algorithm, bug, debugging, syntax error, semantic error, natural language, formal language, variable, keywords, statement, operator, operand, expression, comment, order of operations, data type, integer, floating-point, string, assignment, evaluate,

Python to know: print, *, -, /, +, type, '', =, (), #,

Supplemental Reading: simple assembly language -- what the computer can do at a basic level, but we don't need to think at that level because we have Python (and other high-level computer languages).

Aug 28, 30 Ch. 3, 5 (not 5.8, 5.9, 5.10)

Functions, doc strings, keeping your code organized, converting between types. Defining functions and using functions. How a function works. How python evaluates expressions with multiple function calls in them. Passing parameters to functions (input to the function), and return values from functions.

Integer division and remainder/modulus. Using if, elif, else statements, and the Boolean expressions that are needed for those. Difference between comparision == and assignment =. Being able to think through which statements are being executed with if's in a program.
Getting input using raw_input.

Reading error messages that Python gives you, and trying to use them to find what is wrong in your program.

Terms to know: function, function definition, parameter, function call, argument, return, module, dot notation, Boolean, relational operators (comparison), logical operators (and, or not), modulus,

Python to know: type conversion functions (int, float, str), import math, using math functions like math.sqrt, def, None, return, %, ==, True, False, !=, >, <, >=, <=, and, or not, if, else, elif, raw_input,

Note: We are skipping chapter 4, that does turtle graphics. We will do turtle graphics in a slightly different way than the book a little bit later.

Sep 4, 6 Ch. 5, 6 (not 6.5-6.8), 7

Finishing up some things from last week.

How while loops work, and examples using them.

Focus on incremental development and debugging techniques.

Higher/lower game!

Terms to know: incremental development, algorithm, initialization, update, increment, decrement, infinite loop

Python to know: while, break,

Note: We have skipped over the parts on recursion. We will come back to them later.

Sep 11, 13 Ch. 7, 8

Finishing up some things from last week.

More about dealing with strings/text - builtin functions that Python provides for searching, replacing, dealing with lower/upper case, etc. Using for loops for iterating over each letter in a string.

Terms to know: index, for loop, string slice, immutable versus mutable (unchangeable versus changeable), object (data type that has both data and functions/methods associated with it), method (function associated with an object, accessed with .)

Python to know: using [] and [:] with strings, len, for, string methods (upper, lower, find), in operator, string comparisons (==, <, <=, >, >=, !=)

Supplementary reading: ASCII Code, binary search in number guessing game.

Sep 18, 20

First exam: Sep 20

Python to know: if/elif/else/while/for "one line shortcut", ** for exponentiation (like 10**3 for 1000), * with strings ("ab"*3 makes "ababab"), more string functions (count, replace, see python documentation for more)

Sep 25, 27 Review previous readings

Continuing with strings, for loops, while loops. Introducing turtles.

Terms to know: global variable,

Python to know: from turtle import *, turtle functions - forward, left, right, setheading, setx, sety, resetscreen, bgcolor, penup, pendown, pensize, color, tracer, onscreenclick, onclick, mainloop, global for global variable

Note: For information on using turtle functions, see the comments in the in-class code. For further information, you can look at turtle documentation at python.org

Supplemental: Decoding Nazi Secrets - video and information on cracking the Enigma code in WWII, Beyond Computation: The P vs NP Problem - presentation given at Harvard about problem that is related to whether cryptography can be secure, The Code Book - nice book about encryption throughout history (easy read)

Oct 2, 4 Ch. 9

Text adventure game. Being able to look things up on python.org.

Terms to know:

Python to know: +=, *=, /=, %=,

Oct 9, 11 Ch. 10, 11, 12

Lists, dictionaries, and tuples.

Terms to know: alias of a list/dictionary, list, dictionary, tuple, dictionary keys and values, hash table, hashable (numbers, strings, tuples), dictionary lookup, immutable (tuples/strings),

Python to know: [] or list function to create list, {} or dict function to create dictionary, () or tuple function to create tuple, differences between list/dictionary/tuple, len function with lists/dictionaries/tuples, [:] and [] to access lists/dictionaries/tuples and update lists/dictionaries, for loop and lists/dictionaries/tuples, range function, + and * for lists, list functions (append, extend, sort, remove), del/pop/remove with lists, string functions (split, strip), how lists/dictionaries are passed into and out of functions, returning multiple values and doing multiple assignment with tuples,

Oct 16, 18

Same as last week - lists, dictionaries, tuples.

Oct 23, 25

Second exam: Oct 25

Oct 30, Nov 1 Ch. 13, 14

Dealing with text from files and the web.

Python to know: file operations (open, close, read, write, readlines, use in a loop, second parameter - 'r' or leave out for read mode, 'w' for write mode), catching exceptions, using pickle module (dumps and loads methods), making your own modules, using urllib2 with urlopen/readline/close

Extra software: Visual Python

Nov 6, 8 Ch. 18

Some examples of better and worse ways to solve a problem where one is much slower than the other - binary versus linear search, sorting, examples in the chapters.

Reading outside of book: Binary Search Sorting Algorithms

Nov 13, 15
Nov 20, 22

Thanksgiving break - no classes

Nov 27, 29
Dec 4, 6
Dec 11, 1-3pm

Final Exam