Think Python
by Allen Downey
Needham, MA: Green Tea Press, 2015.

Your textbook is available as a free PDF. If you wish to purchase a paper copy, you can buy it on Amazon.


Python 3



Introduction to solving computational problems, including the fundamentals of computer programming. Topics include imperative programming constructs (variables, loops, conditionals, functions, recursion), basic object-oriented constructs (classes, objects), and some fundamental algorithms and data structures (dictionaries, arrays, linked lists, basic sorting). Student learn these concepts through studying the Python programming language.

At the end of the course, you will be expected to be able to:

  • Read, understand and execute a computer program written in Python.
  • Read a set of requirements for a computer program in English, and write a short Python program (100 lines or less) that corresponds to them.
  • Test a Python program and identify and fix programming errors.
  • Identify some errors in a Python program without testing it.
  • Without using a computer, write a very short Python code fragment (10 lines or less) that correctly implements a set of requirements.
  • Understand and apply variables, loops, strings, lists, conditionals, and functions.
  • Write programs to perform mathematical calculations.
  • Understand the concept of a module.
  • Write a Python program that is separated into at least two modules.
  • Understand the concepts of class and object, and distinguish between them.
  • Write a Python program including objects of at least one student-designed class.
  • Write and understand appropriate comments in a Python program.
  • Understand the concept of an algorithm and compare the efficiency of different algorithms for a simple task.


It is the policy of Hendrix College to accommodate students with disabilities, pursuant to federal and state law. Students should contact Julie Brown in the Office of Academic Success (505.2954; brownj@hendrix.edu) to begin the accommodation process. Any student seeking accommodation in relation to a recognized disability should inform the instructor at the beginning of the course.

Academic Integrity

All Hendrix students must abide by the College’s Academic Integrity Policy as well as the College’s Computer Policy, both of which are outlined in the Student Handbook.

For specific ways the Academic Integrity policy applies in this course, please refer to the Computer Science Academic Integrity Policy.

The short version is that academic integrity violations such as copying code from another student or the Internet are easy to detect and will be taken very seriously.

If you have any questions about how the Academic Integrity policy applies in a particular situation, please contact me.


Please do not bring laptops to lecture. This may seem strange in a computer science class. But lab is the place where you will get plenty of experience working on the computer; lecture is a time for thinking and learning without the distraction of a computer.

Exceptions may be made on a case-by-case basis if you can prove to me that you really do benefit from using your laptop to take notes.


PDF syllabus

We will be covering most of the material in the textbook, approximately one new chapter each week. You should view your textbook as another perspective on the material presented in class and covered in the labs. We will also be using additional supplemental material such as relevant web pages and background material for the lab assignments. Readings will be assigned before material will be covered in class. You are expected to review the material and come to class prepared.

Homework and quizzes

There will often be short homework assignments to be completed over the weekend, assigned on Friday and due Monday, sometimes with a corresponding quiz at the beginning of class on Monday.

These quizzes and homework assignments together will comprise 15% of your final grade.

# Name Due
0 Who Are You Friday August 24
1 Minecraft Monday August 27
2 Tracing practice (Sample solutions) Wednesday September 5
3 Conditional practice Monday September 10
4 Function and loop reading Monday September 24
5 DNA Strings Monday October 1
6 For loop reading Wednesday October 24
7 Dictionary & heap reading Wednesday October 31
8 Class design practice Wednesday November 7
9 Recursion practice Wednesday November 14


Please submit labs electronically using this form!

# Name Assigned Due
1 Minecraft Hour of Code Aug 22/23 Aug 29/30
2 Kepler and Newton Aug 29/30 Sep 5/6
3 Diagnosing Heart Disease Sep 5/6 Sep 12/13
4 This Day in History Sep 12/13 Sep 19/20
5 Guess My Number Sep 19/20 Sep 26/27
6 Mutation is the Word Sep 26/27 Oct 3/4
7 Line Editor Oct 3/4 Oct 17/18
8 Caesar’s Secrets Oct 17/18 Oct 24/25
9 Sentiment Analysis Oct 24/25 Oct 31/Nov 1
10 Water Jugs Oct 31/Nov 1 Nov 7/8
11 Fractal Recursion Nov 7/8 Nov 14/15
12 On Stuckness and debugging Nov 14/15 Nov 20*
13 Civic Data Hacking Nov 28/29 Dec 3

* Technically this lab is due before you leave for Thanksgiving; but the intention is that you should be able to finish it during the 3-hour lab period on Nov 14/15.

Much of your experience with programming in this course will be through weekly labs, which will comprise 25% of your final grade. Each lab will be assigned Wednesday/Thursday in lab with time allotted to work through the materials, and will be due by the start of the following lab. All labs are weighted equally within the lab portion of your final grade.

Each student has four late days to spend throughout the semester as they wish. Simply inform the grader (DenneyJM@hendrix.edu) any time prior to the due date for an assignment that you wish to use a late day; you may then turn in the assignment up to 24 hours late. Multiple late days may be used on the same assignment. There are no partial late days; turning in an assignment 2 hours late or 20 hours late will both use 1 late day. Note that late days are intended to cover both normal circumstances (you simply want more time to work on the assignment) and exceptional circumstances (you get sick, travel for a game or family obligation, etc.). Aside from late days, late assignments will not be accepted.

On these labs, you may work with a partner on the lab assignments if you choose. Their name must be listed on any code you hand in as joint work. A partnership need only turn in a single copy of the assignment. If students working as partners wish to turn in a lab late, both students must use a late day.

Lab attendance is required. Labs take place in the Snoddy Computer Lab, in the Bailey Library. As you go through the exterior door of the library, turn immediately to your left and enter the Snoddy Academic Resource Center, through this door:

Continue through the door at the far end of the hall (just visible in the picture above) into the first computer lab, and then enter the second lab at the back.

You will be handing in your lab work electronically. Instructions on how to do so will be included in each lab.

Labs should follow the Python style guide. You may use the automated style checker to help you catch common style errors.


You will have three projects in this course, one about every five weeks, for a total of 35% of your final grade. These projects will cover concepts we have discussed in class and in labs, and will be due approximately one week after they are assigned.

You must work individually on the first two projects. You may discuss concepts and ideas with your classmates, but the code you turn in must be your own. You will be graded not only on correctness, but also technique, documentation and evaluation of your solution. Further details on the grading standards and handin instructions for each project will be given when they are assigned.

Please submit projects electronically using this (same) form!

Project Name Pct Assigned Due
1 Question-Answer 5% Sep 10 Sep 24
2 Word Games 10% Oct 22 Nov 2
3 Final Project 20% Nov 12 Dec 10


There will be three in-class exams, the first worth 5% and the last two each worth 10% of your final grade. They will consist of short answer questions along with writing and debugging code.

There is no final exam; you will complete a final project instead, as described above under Projects.


Your final grade for this course will be based on the Labs, Projects, Quizzes, Exams and Participation described above.

Component Percent
Labs 25%
Projects 35%
Quizzes, HW, participation 15%
Exam 1 5%
Exam 2 10%
Exam 3 10%