Overview

Textbook

Think Python
by Allen Downey, 2012
Olin College, MA
This textbook is open-source; we have reorganized and edited it to match our course syllabus.

Software and Hardware

Python

App Inventor

Overview

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.

Disabilities

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, will be taken very seriously, and carry a default recommended sanction of failure in the course.

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

Laptops

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.

I will make an exception if you can prove to me that you really do benefit from using your laptop to take notes.

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.

Quizzes and HW

Sporadically throughout the semester, there will be short quizzes covering material from the previous class. You are encouraged to attend class and actively participate in discussions every day (answering questions, asking questions, presenting material, etc.)

There will also often be short homework assignments to be completed over the weekend.

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

HW Due
0: Who Are You January 20
1: Communication and Origami January 25
2: Logic puzzles February 1
3: Function reading February 17
4: DNA Strings February 24
5: While, string, and list reading March 2
6: Zen reading – section 1 March 30
7: System analysis April 4

Labs

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 Tuesday morning in lab with time allotted to work through the materials, and will be due by Wednesday at 4pm. 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 me 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 with no penalty. 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.).

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 via Moodle. Instructions to do so will be included in each lab.

Lab Name Assigned
1 Minecraft Hour of Code Jan 19
2 Kepler and Newton Jan 26
3 Diagnosing Heart Disease Feb 2
5 CodingBat Feb 16
6 Mutation is the Word Feb 23
7 Caesar’s Secrets Mar 1
8 Fractal Recursion Mar 15
9 Sentiment Analysis Mar 29
10 On Stuckness and debugging Apr 5
11 Die Hard III Apr 12
12 Processing Apr 19
13 Final project workshop (optional, 9am-11am) Apr 26

Projects

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.

Project Name Pct Assigned Due
1 Today in History 5% Feb 9 Feb 16
2 Word Games [ Sample project start ] 10% Mar 8 Mar 15
3 Final Project 20% Apr 11 Monday, May 9, 8:30am

Exams

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 along with writing and debugging code.

  • Exam 1: Monday, February 8, covering input/output, math, numerical data, conditionals, and binary encoding
  • Exam 2: Monday, March 7, covering functions, while and for loops, lists and strings [ Practice exam ]
  • Exam 3: Friday, April 22, covering recursion, dictionaries and object-oriented programming [ Exam prep ]

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

Grading

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%