CS111 (Introduction to Computer Science)
Spring 2012, Carleton College
- Instructor: David
- Lecture: 2a (MW 9:50--11:00a, F 9:40--10:40a), Leighton 305.
- Office Hours: see my homepage.
Always feel free to email for an appointment if the scheduled times
aren't good for you.
- Official catalogue description:
This course will introduce you to computer programming and the design
of algorithms. By writing programs to solve problems in areas such as
image processing, text processing, and simple games, you will learn
about recursive and iterative algorithms, complexity analysis,
graphics, data representation, software engineering, and
object-oriented design. No previous programming experience is
There is an anonymous feedback form
available for any comments that you have about the course. If you
have any suggestions or comments on the class (style, content,
workload, etc.), please feel free to use this form to let me know.
The CS department has an email newsletter, the
Carleton Sentinel, that we use for occasional updates on things
that might be of interest. Sign up here!
Week 1: course overview; intro to CS
The computer labs on the 3rd floor of the CMC
are set up with Python for your use throughout the term. If you'd
like to work elsewhere, you are welcome to install Python on your own
computer. Using your own machine is perfectly welcome, but making it
all work properly is entirely up to you. Instructions should be
available shortly on the CS Department homepage, or you can go to python.org/download
using Python 2. (You should download the latest version of Python
- 26 March 2012 (M):
intro to CS and CS 111.
Reading: Zelle, §1.1–1.5.
PS01 (on logistics and finding frequent words) was
posted on Moodle today. It's due on Wednesday.
Go to CMC 304 or 306. The machines in those
rooms all boot into both Windows and MacOS; you'll need MacOS. (If
you don't see a Mac login screen, you'll need to reboot into the Mac
side.) Log in, using your Carleton user name and password. Now go to
the following tutorial
which was originally written by Michael Stonebank of the University of
Surrey, and modified by Jeff Ondich to match the Carleton setup. Work
through Typographical Conventions, Introduction to the UNIX Operating
System, and Tutorials 1-4 of this Unix tutorial. There's nothing to
hand in, but please post questions/comments on the Moodle site or
bring questions to class.
- 28 March 2012 (W):
algorithms, office hours, addition, and pair programming.
If you have a Zelle 2nd Edition (i.e., the incorrect
version for this class), then (a) you'll need to check on section
equivalences to make sure you're reading the right material (main
difference: Chapters 4 and 5 are swapped), and (b) there will be some
syntax differences that are annoying. You can
(written by Sherri Goings, with some edits by Dave Musicant)
for a translation.
Reading: Zelle §1.6, 1.7.
As usual, please post responses in Moodle.
PS02 (on Scrabble and academic honesty) was
posted to Moodle today. It's due on Friday.
- 30 March 2012 (F): xkcd [0, 1], forum questions, algorithms for
Reading: Zelle §2.1–2.5.
PS03 (on an introduction to Python and on making
change) was posted to Moodle today. Part I is due Monday. Part II is
Week 2: expressions, computation, and data
- 2 April 2012 (M):
eval/int/types; how computers work.
Reading: Zelle §3.1, 3.4–3.6.
- 4 April 2012 (W):
data and data types; variables as names; conditionals.
Reading: Zelle §4.1–4.4.
PS04 (on writing with numbers) was posted to
Moodle today. It's a pair assignment due Friday.
- 6 April 2012 (F):
control structures, strings and slices, and Lake
Reading: Zelle §2.6, 3.3,
PS05 (on weather and electricity) was posted to
Moodle today. It's an individual assignment due
Week 3: functions, loops, lists
- 9 April 2012 (M):
pop quiz (if and for); loops; fun with words; ps06 walkthrough.
Reading:Zelle §4.6, 8.1–8.3.
PS06 (on the Caesar cipher) was posted to Moodle
today. It's due on Friday, to be done with your newly assigned
- 11 April 2012 (W):
more fun with words.
Reading: Zelle §6.1, 6.2.
The first midterm will be held on Monday, 16
April 2012. Any material that we've discussed in the class is fair
game, including material in class, problem sets 1–6, and all
assigned readings. I've gotten a request to pull together some
exercises from the book that would be good practice for the exam.
Here are some that I've identified. Certainly don't feel like you
have to do anything close to all of them, but these are good ones to
From Zelle's first edition:
|3||1 (just say "int" or "float"),4||3,4,5,11,15|
- 13 April 2012 (F):
even more loops; even more fun with words.
PS07 (on social networks) was posted to Moodle
today. It's due Wednesday. (But these problems may be good practice
for the exam, so you're welcome to work on them this weekend if you
Reading: Zelle §6.4–6.6.
Week 4: prelim #1; loops, lists, functions
- 16 April 2012 (M): prelim #1
- 18 April 2012 (W):
more on functions and parameters, and prime numbers.
PS08 (on Scrabble) was posted today.
It's due on Monday, though I recommend starting on the first few
functions (scoreWord, isPlayable, ...) sooner.
- 20 April 2012 (F):
more loop practice: consonant clusters; factorial; Nine Billion Names; a teaser on recursion.
Reading: catch up. Post to Moodle things
that are still puzzling at this point in the term, or answer someone
Week 5: data representation; objects and classes
- 23 April 2012 (M): ending the universe;
diamonds/triangles/antidiamonds; the parable of fish.
The documentation for Zelle's graphics package
Reading: Zelle §5.1–5.4, 10.1.
PS09 (on graphics and drawing faces) was posted
to Moodle today. It's due on Friday.
- 25 April 2012 (W):
classes and objects
Reading: Zelle §10.2–10.3.
- 27 April 2012 (F): midterm course evals. classes, objects,
Reading: Zelle §10.4–10.5.
PS10 (on cities and clouds) was posted
to Moodle today. It's an individual assignment due next Friday.
Week 6: midterm break; nested loops
- 30 April 2012 (M): midterm break!
- 2 May 2012 (W): auctions, aliasings, classes, objects, lists of lists.
Reading: Zelle §11.1–11.2.
The second midterm will be held on Monday, 7 May 2012. Any material
that we've discussed in the class is fair game, including class
through 4 May; problem sets 01–10; and all assigned readings.
I've identified some good practice exercises from the text. Certainly
don't feel like you have to do anything close to all of them, but
these are good ones to try. (The problems from exam 1 remain good
practice!) It's also not a guaranteed-to-be-exhaustive list; there
may be other kinds of questions. But these are potentially helpful
- 4 May 2012 (F): nested loops, crosswords, and image processing.
Reading: Zelle §11.3–11.4.
PS11 (on image processing) was posted to Moodle
today. It's due Wednesday (part I) and Friday (part II), to be done
in your third-round partnerships.
Week 7: prelim #2; using objects; image processing
- 7 May 2012 (M): prelim #2
- 9 May 2012 (W):
taking CS in the fall; the CS course
comps; designing a recommender system.
Reading: Zelle §7.5.
The final project announcement was posted to
Moodle today. A proposal is due next Wednesday. The project itself
is due on the last day of finals at 5:00p. Save the date of our
finals exam slot in your calendars: we'll do a demo session of your
awesomely awesome (but still in progress) projects then!
- 11 May 2012 (F):
practice with tiling and scaling images.
Reading: Zelle §12.1, 12.4.
PS12 (more on images and image processing) was handed
out today. It's due on Friday.
Week 8: recursion, search, complexity
- 14 May 2012 (M):
recommender system wrapup; your questions.
Reading: Zelle §13.2.0–13.2.5.
- 16 May 2012 (W):
practice with recursion.
Reading: Zelle §13.1
- 18 May 2012 (F):
Reading: Zelle §13.2.6–13.2.7.
PS13 (on recursion and fractals) was handed out
today. It's due next Friday.
Week 9: searching and sorting; complexity
Week 10: prelim #3; wrapup
- 28 May 2012 (M): prelim #3
- 30 May 2012 (W): course evals; ask me anything.
- Richard Russo, Straight Man.
- Adam Gopnik, Paris to the Moon.
- Douglas Hofstader, Godel Escher Bach: An Eternal Golden Braid.
- Adam Gopnik, How the Internet Gets Inside Us, from The New Yorker, February 2011.
Our finals slot is Saturday, 2 June,
8:30–11:00a. We will have a demo session for your final
projects during this time slot. Come with a demo-able version of your
project (in progress is fine!). The project itself is due on the last
day of finals (Monday, 4 June) at 5:00p.