2012 May 31,

CS 111: Intro to Computer Science

Carleton College, Spring 2012

Prof. Joshua R. Davis, , Goodsell 106B, x4473


This is a first course in computer science. There are several themes. Perhaps the main theme is problem solving: How do you get a computer to accomplish a particular task, even though the computer wasn't designed for that task? Another theme is demystifying computers: How does a computer play a movie, or create a movie, or play chess, or transmit sensitive data securely? Another theme is thinking like a computer scientist: How do various solutions to a problem compare, and is there a best solution? By the end of the course, you may have a much greater appreciation for, and understanding of, our technological world.

Most of our assignments take the form of computer programs written in the Python programming language. However, programming in Python is not the point of this course, any more than writing English is the point of a history course taught in English. We use a programming language, just so that we can talk to the computer, and use it to illustrate concepts for us.

Our class meets in CMC 209 during period 3A (MW 11:10-12:20, F 12:00-1:00). The course materials are:

My office hours are 4A (Mon, Wed, and Fri) and Thu 1:00-2:00. I am often in my office during 2A as well. You can also schedule an appointment with me. Our prefect is Dave Abel; you can also schedule appointments with him. His e-mail address is what you'd expect.


Final grades (A, B, C, etc.) are assigned according to an approximate curving process. By this I mean that there are no predetermined percentages (90%, 80%, 70%, etc.) required for specific grades. The following elements contribute to the final grade.

You are expected to spend at least 10 hours per week on this course outside class. Some students need to spend more than 10 hours. If you find yourself spending more than, say, 15 hours, then talk to me.

Working with Others

For some assignments the students are expected to work in pairs. Your pair hands in a single copy of the assignment with both names on it. You are encouraged to talk with other pairs — to bounce ideas off them — but the work that you submit must be the work of your own pair. The two members of a pair must contribute roughly equally.

Other assignments are individualized. Even on these assignments, you are encouraged to talk with other students. In the end, however, you write or type your own solution, in your own words.

You may not copy someone else's work or allow them to copy yours — in person, over the Internet, etc. Presenting someone else's work as your own is an act of Academic Dishonesty. If Carleton College finds you to not to have upheld its Academic Honesty standards in this course, then you will receive an F for this course.

Standards for Work

Writing is not just for English majors. Written and oral communication skills are essential to every academic discipline, and are highly prized by employers. In this course, your work is evaluated both for correctness and for polish. Ensure that your Python code is efficient, well-organized, and easy to read. Proofread your English writing, and revise as necessary.

When handing in multiple pages of paper, staple them into a single packet, in the correct order. Packets that are not stapled are unacceptable. I will not accept packets that are not stapled. Staple your packet. Your packet? Staple it. Is there a stapler in the classroom? Often not, so staple ahead of time. Is a paper clip okay? No.

Computer files should be submitted in plain text (.txt), PDF (.pdf), or Python (.py) formats only, unless otherwise specified. In particular, Microsoft Word documents are unacceptable. Fortunately, you can "print" any document to PDF easily. Ask for help if you need it.

Special Accommodations

During the term, you have one free pass to hand in an assignment late. Instead of handing in the assignment, send me e-mail, by the due date, declaring that you are using your late pass and proposing a new due date. If the due date is extended by only one class meeting, then no explanation is necessary; if you need longer, then convince me. When you submit your late work, mark it "Late Pass Used" prominently at the top. Once you have used your late pass, no late assignments are accepted, except in extreme circumstances that are truly beyond your control.

If some medical condition affects your participation in class or your taking of exams, let me know in the first week of class. You may need to make official arrangements with the Office of Disability Services.


This schedule is tentative; topics may be reordered, and exams may be moved slightly, based on the progress of the course.

M 3/2601introduction, Python basicsIntroduction1-22Intro to Python, A
W 3/2802Python conditionals, loopsIntroductionChapter 1Intro to Python, B
F 3/3003Python lists, functionsIntroductionIntro to Python, C
M 4/0204artificial intelligenceTic Tac Toe
W 4/0405problem solving, algorithmic thinking
F 4/0606problem solving, algorithmic thinkingtictactoehelpers.py
M 4/0907ciphersCiphers83-102
W 4/1108frequency analysis117-128, 271-278thewaroftheworlds.txt
F 4/1309all data are numeric
M 4/1610binaryBinaryBinary Numerals
W 4/1811binaryBinary Numerals
F 4/2012image processing, higher-order functionsImage Processing185-204imageexamples.py
M 4/2313exam
W 4/2514image processing205-234
F 4/2715efficiency
M 4/30midterm break
W 5/0216sortingEfficiencysorting.py
F 5/0417recursion305-317recursion.py
M 5/0718recursionRecursionrecursion.py
W 5/0919RSA cryptosystemRSA
F 5/1120objects329-343simulation.py, earth32.bmp, moon32.bmp
M 5/1421objectsObjects344-366zombies.py
W 5/1622objectsProject367-392
F 5/1823project work
M 5/2124inheritance393-422
W 5/2325exam
F 5/2526project work
M 5/2827programming at a lower levellowerlevel.c
W 5/3028conclusion, project work, demos
S 6/03project due 6:00 PM