Main Page | Syllabus | Weekly Schedule | Links & Resources
Prof and TAs
Dominique Thiébaut email
Dept. Computer Science
Ford Hall, 356.
Telephone: 3854
Office hours Monday, 2-4 p.m., Tuesday 1-3 p.m., and by appointments
To see when and where TAs are available this week, click here .
...
Weekly Schedule
Week
Topics
Reading
Week 1 9/8
Thursday
A look at the syllabus
Introduction to computer programming
Example of a Python program
Read Chapter 1 in Zelle.
Whenever there are examples in Python, try them out at your computer.
Test yourself with the Programming Exercises at the end of the chapter.
Read the article on pair programming. We will discuss it in class on Th 9/15.
Week 2 9/13
Tuesday
5 minutes with Guido von Rossum
{{#widget:Google Video
docid=-7758421725489622662
width=400
height=326
}}
A word about semantics: a look back at the challenge solutions for Lab #1
A variable is just a way to name a memory location...
Rules for naming variables
Temperature conversion program.
Thursday
Quiz (2 questions) on article on pair programming.
Overview of Homework #1
New tools!
Beowulf and Emmy : Linux servers
Secure Shell Access (ssh )
Emacs : an editor for programmers
Syntax and Semantic
Exploring functions
A function for greeting the user
The main function
Assignment statement: e.g. a = 3 , or a, b = 10, 20
what really goes on inside the computer
multiple assignments on one line
Discussion of article on pair programming.
Friday
Computer Science lunch. "What we did last summer: CS Majors share their experience of the past summer. Informal gathering with free food , Ford Hall 345, 12:00-1:00 p.m.
Reading
We're starting on Tuesday with material from Chapter 2. In particular understanding variables and assignments, and the temperature conversion program.
Week 3 9/20
Reading
On Tuesday we'll cover some material from Sections 2.5 (assignment) and 2.6 (definite loops) in Zele.
Week 4 9/27
Tuesday
Q&A About current homework
Top-Down design Exercise:
A detailed look at the approach taken to solve a complex assignment.
Debugging techniques (print statements, comments)
Some comments about the last homework assignment
Solutions posted (BOTW)
Header
Documentation
Wrap long lines
(Advance video to 7-minute point and watch...)
Reading:
Read Chapter 3 in Zelle on your own. Instead of covering the information of this chapter in a class, we'll visit this information throughout the semester as we progress with Python.
Important concepts from Chapter 3:
the math functions (abs, round), and
the fact that mixing integers and floats always yields a float result.
math operators: /, //, % (remainder)
Week 5 10/4
The concept of classes and objects
Encapsulating data and actions in objects
Cartesian system
Graphics primitives: GraphWin, Text, Point, Rectangle, Circle, Line.
Standard methods: draw(), setWidth(), setFill(), close()
Where can I get documentation on all of the Classes and Methods? here!
Playing with graphics objects: Demo program (A good place for printing graph paper.)
Thursday
Handout on classes and methods defined in graphics.py
Continuation of exploration of graphics primitives
Point, Circle, Line, Rectangle, Text
Taxi Example
Week 6 10/11
Thursday
Pixelating George Clooney...
A quick word about the RGB color model. Check out this nice video on YouTube as well...
The Image( Point, fileName ) objects
The color_rgb( ) and getPixel( x, y ) functions
Result: we go from
to
Week 7 10/18
Second Half
Week
Topics
Reading
Week 8 10/25
Welcome to our visitor: Susan S. Elliott, Founder & Chair, SSE, Inc., and author, Across the Divide: Navigating the Digital Revolution as a Woman, Entrepreneur and CEO.
Turing and the Turing Test
The Loebner Prize
And the winner for 2011 is: Rosette
Introduction to Rosette , the chatbot/chatterbot .
Python
loops: Review the break statement, and meet a new statement: continue
in as an operator returning true or false : if x in [ 1, 2, 4, 10, 20]: ...
Exercises
Eliza (demo with emacs: hold shift and hit the escape key. Then type xdoctor and hit return)
Want to learn more about chatbots? Check out this page !
Wednesday : Presentation of the CS Major , 12:00 p.m., FH241.
Thursday
building a chatbot similar to Eliza
something to start with: get the demo program from Lab 8 .
introducing randomness in picking answers
know how to stop the conversation
Detect family members
Detect short negative answers
reflection
reflect "I" into "you", as in "I am bored" becoming "You are bored?"
reflect "I" into "you" and "you" into "I": tricky!
How can we make Eliza remember past answers from the user?
program we developed in class
Week 9 11/1
Tuesday
A better AI Example: Watson!
A note about HW #5: Dealing with multiple objects: Lists and Loops. An example program
Slicing strings and lists.
Functions returning values. Exercises
Reading
Slicing of strings is covered in Chapter 5. Slicing of lists works exactly the same way, and is covered in Section 11.2.
Functions returning values are covered in Section 6.5.1.
Read section 6.6
Week 10 11/8
(The disk is opened around the 4-minute time marker, power up around 5 min 30 sec., and read errors show up around 7 min.)
SSD vs. HDD (YouTube video -- go to 2 min 30 sec for dramatic vibration test)
Thursday : Otelia Cromwell Day (no labs)
Exceptions : try/except. Exercises
The While loop: the indefinite loop
The syntax and how it works
Transforming for-loops in while loops (not very useful, but illustrates well how while loops work)
Sentinel loops (looping through numbers, looping through strings)
Computation until some quantity reaches some value
Making user input robust (keep on asking for something until it is one of the expected values)
Infinite loops (while True )
Boolean variables
Exercises
Reading
Exceptions: Section 7.4
Passing objects: Chapter 6 on Functions
Text file processing: Section 5.9
While loops: Chapter 8
Week 11 11/15
Tuesday
A note about the current best 1000 movies homework:
make sure program does not crash if input file does not exist
Test, test, test! The movie 2001 came out in 1968...
Continuation of While Loops.
Breaking/Continuing from nested while loops
Boolean variables
Exercises
Breaking out of double loops: break and continue only work with inner loops Example ( and solution programs ).
Review of good practices for this class
Read the sections in the textbook that cover the material we see in class
Look at the solution programs! There's a reason why they are posted!
Redo the exercises we do in class. Try to come up with the solution on your own.
Remember Benjamin Franklin
Exceptions: Difference between NameError and TypeError : http://docs.python.org/library/exceptions.html
Top-Down Design: Putting N-Queens on an NxN chessboard. This is the first step of a more complex problem we'll revisit later and which deals with the N-Queens problem .
Program we created in class.
1 solution for an 8x8 chessboard: [3, 6, 2, 7, 1, 4, 0, 5]
An introduction to Homework 9's two problems:
Average presidency: a rehash of an almost-ready solution
Elevator to the Stars: revisiting old solutions with a bit of ingenuity (algorithm)
Reading
Top-Down design rules are covered in Section 9.3
Common loop patterns are covered in Section 8.3
Week 12 11/22
Thursday : Thanksgiving Break
Week 13 11/29
Office Hours today: 2:30 p.m. - 5:00 p.m.
OOP with Classes!
A review and an introduction: review objects, introduce classes.
OOP and graphics
Programming Example with Classes: A class for a car
(Advance to 2 min 10 sec)
Reading
Classes are covered in Chapter 10 of the textbook.
Week 14 12/6
Tuesday
Office Hours today: 2:30 p.m. - 5:00 p.m.
Discussion: how to create simple animation based on the fish animation: Look at work by Eadweard Muybridge .
Creating a python module
Using a python module
Thursday
Reading
Inheritance is covered in Section 12.4 of the textbook.
Dictionaries are covered in Section 11.6, Non-Sequential Collections
Week 15 12/13
Thursday : Final Take-Home Exam , will be due 12/22/11 at 4:00 p.m.
Links and Resources
Graphics Library
On Line Python books
disocovermagazine.com blog. Check out the answers posted by many readers. They contain some interesting links that you may find useful!
Python keywords
The list of all the reserved words of the Python language
and del for is raise assert elif from lambda return break else global not try class except if or while continue exec import pass yield def finally in print
Linux
Misc
If you decide to work in pairs for the homework assignments, you need to follow the protocol for 'pair programming' as discussed in this article .
All the programs of Zelle's Python textbook
Software
Using SSH on Windows, Linux, or on a Mac with OS X
Math
Back To Main Page