Course Schedule

[Note: this webpage last modified Monday, 22-Oct-2012 09:09:35 EDT]

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

Things you know: These are things I assume you already know from previous courses or experience: basic computer use (web browsers, email, installing programs on your computer), basic algebra and math. For the math, I assume you can do things like solve an equation for an unknown, or draw a graph/plot of a function such as y = x2. We will review any other math that may be needed (which will not be much).

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.

Simple search engine...

WeekReading Topics
Jan 10, 12 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 for Windows, Python for Mac, or Python for Linux.

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).

Jan 17, 19 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.

Jan 24, 26 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.

Jan 31, Feb 2 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 (==, <, <=, >, >=, !=)

Note: We'll probably do while loops on Tuesday and the string stuff on Thursday.

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

Feb 7, 9 none

Catching up on the material listed on last week. Reviewing for the first exam. Review all the readings up until now, the homeworks, and the in-class code for each day.

Feb 14, 16 exam 0 on Feb 14

Exam on Tuesday, go over it on Thursday.

Feb 21, 23 Ch. 9, something about turtles

More on using strings, for and while loops. Reading text from files. Hangman game. Being able to look things up on python.org.

Terms to know:

Python to know: open/readline/close for files, urlopen/read/readline/close for webpages with urllib2, +=, *=, /=, %=, 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)

Feb 28, Mar 1 Review, Read Ahead

Turtle game.

Hangman game - not using turtles, but practice with strings.

Showing some examples of lists, dictionaries, tuples already. This will be the topic for the week after spring break. It is very important, so we'll start looking at it this week too.

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

Mar 6, 8

Spring break, no classes

Mar 13, 15 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,

Mar 20, 22

Repeat from last week - lists, dictionaries, tuples.

Mar 27, 29 exam 1 on Mar 27

Simple maze-navigation game. Will use some of what is new next week from chapter 14.

Download: FileZilla, Putty.

If you have Linux/Unix or Mac, instead of putty you can open a terminal/shell and "ssh -l YourLogin cs.indstate.edu".

Apr 3, 5 Ch. 13, 14

Maze game - example of using lists to store information.

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

Apr 10, 12

Simple search engine - more practice with lists, dictionaries, strings, etc.

Dealing with directories, recursion.

Python to know: using os module (os.getcwd, os.listdir, os.path.isdir, os.path.isfile, os.path.exists), running another program (os.system)

Apr 17, 19
Apr 24, 26

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.

Extra information (for fun): Binary Search Sorting Algorithms

May 1 final exam, 1-3pm for section 003, 3-5pm for section 001