Computer Science 150

Introduction to Computer Science

Spring 2015

  web page:


Bob Geitz, King 223A


Office Hours:

Monday 2:30-4:30, Thursday 10-12, or by appointment

I am around most of the day when I am not in class.


This is an introduction to Computer Science and algorithmic thinking. In this class you will learn to program in the language Python, but you will learn many other things as well. This is as much a class about problem-solving as it is about programming and the class concepts can be applied to every academic discipline. The class is self-contained; we do not expect you to have any prior programming experience. The class does move quickly and it builds on itself; this is not a class to fall behind in.


John Zelle, Python Programming: An Introduction to Computer Science 2nd edition. Franklin-Beedle & Associates, , 2010.

This is the most readable book I have found on Python. Beware of editions -- this second edition refers to the Python 3 language which we'll be using in this class. There is a first edition still available that refers to Python 2, which we won't be using. The two versions of Python differ in small but significant ways. You will find the first edition of Zelle's book very confusing because none of its code will work in our systems. .


The Labs:

We will have 12 labs, 10 of which have prelab assignments and all of which have postlabs.. These are not optional. Much of your grade and almost all of your learning will be determined by your work in the labs. Every week the lab assignment is due by 6pm Tuesday and the next prelab is due in class on Wednesday. Because the prelab is designed to prepare you for that week's lab, I won't accept late prelabs. Either get them in on time or lose the (small number of) points for the prelab.


I expect you to have read over the lab materials before you come to the lab session. The lab assignment you will hand in electronically; these are due by 6pm each Tuesday. I will accept late labs, though there is a penalty of 10 points per day (out of a total of 50 possible points for each lab), only until midnight on Friday. There is a reason for this penalty -- the lab is where most of your learning will take place. The labs build on themselves. You can't do one lab until you have done the previous labs, so if you are late with one and start to fall behind, the situation just gets worse and worse. The penalty is an encouragement to not fall behind. You can have 3 "late lab extenstions" over the semester; these allow you to hand in the lab up to Friday at midnight with no penalty.


The postlab assignments are very simple -- I ask you to answer one question: "What did you learn from this lab?" and then supply any additional comments about the lab that you wish to share. I want these on paper, not in email, and they can be brief, hand-written and sloppy as long as I can read them. These are due in class each Wednesday along with the next prelab. Learning is improved by reflection; these postlabs are just an opportunity for you to reflect on the work you just completed.


How long the labs take varies from student to student and from lab to lab. Most students should be able to complete the prelab assignments in an hour, and the lab assignments in 6 to 7 hours, including the 2 hours you spend in the lab itself. Programming is one of those activities where trying to rush actually makes you go slower. If you are organized and careful you will find that you finish the labs faster and they will be much, much more enjoyable than if you try to get them done quickly and end up spending hours debugging.

Exams and Grading:

We will have 2 in-class exams during the semester and a comprehensive final exam. Here is how the grades for the course will be composed:

Note that the final exam will be Thursday, May 14 at 9AM. This time is set by the Registrar and I cannot change it for the class or for individuals. If you have issues with this time you should talk to the Dean of Studies immediately.



There are lots of ways to get help with this class. One is by talking to me. I am around just about all day Monday-Friday and this is the only class I am teaching this semester. You can talk to me outside of my posted office hours, but it might help to let me know you are coming. I and Professor Alexa Sharp will be in the labs during the lab sessions along with several student helpers. There are also evening and weekend lab helpers who can help you with the labs. I will post their schedules on the class web page

The Honor Code

The Honor Code has a straightforward application to this class. On all of the exams you are responsible for your own work; you may neither give nor receive any information during the course of the exam. If someone takes an exam at a different time than the rest of the class there may be no communication concerning the exam between that person and anyone else in the class, not even whether the exam was easy or difficult. The atmosphere is much more relaxed for the lab assignments. You may discuss the labs, including details of the programming code, with anyone else in the class, but in the end you must write your own code. Making a copy of someone else's code and handing it in as your own, even if you change the names of the variables in the program, is a violation of the Honor Code. You should be learning to think structurally about code, so talk to anyone about functionality and then write the code yourself.

Course outline: Here are some thoughts about what we'll do this term, though all of this is subject to change.

Week Day Topic/Reading HW/Labs
Week 1

Feb 2-6

Course Overview.
Introduction to Python
Data types, program structure
Conditional statements
Read Chapters 1, 2

Lab 1: Hello World!
Postlab 1

Week 2 Feb 9-13

Loops and Lists
Read Chapter 8

Prelab 2
Lab 2: The Basics
Postlab 2
Week 3 Feb 16-20

Simple grapphics
More with lists
Read Sectons 5.1 to 5.6

Prelab 3
Lab 3: Loops and Graphics
Postlab 3

Week 4 Feb 23-27

Program Design
Read Chapter 6

Prelab 4
Lab 4: Exceptions, Pictures, and the Mastermind Game
Postlab 4
Week 5 March 2-6

Reading from Files
Parameters, Arguments and Returns
Read Chapter 6, Section 13.2

Prelab 5
Lab 5: The Game of Life
Postlab 5
Week 6 March 9-13 Classes
Exam 1

Read Section 10.1 and 10.2

Prelab 6
Lab 6: Recursion
Postlab 6

Week 7 March 16-20 Objects, Methods, Constructors
Read Section 10.3 to 10.7
Prelab 7
Lab 7: Scavenger Hunt
Postlab 7
Week 8 March 30-April 3

Subclasses and Inheritance

Prelab 8
Lab 8: Digital Sounds
Postlab 8

Week 9 April 6-10 Dictionaries and other data structures
Read Chapter 11
Prelab 9
Lab 9: Critter Tournament
Postlab 9
Week 10 April 13-17 File I/O
Exam 2
Read Sections 5.8, 5.9
Prelab 10
Lab 10: Wordplay
Postlab 10
Week 11 April 20-24 Object-Oriented Design
Read Chapter 12

Prelab 11
Lab11: Multiprocessing
Postlab 11

Week 12 April 27-May 1


Prelab 12
Lab 12: Go fish
Postlab 12
Week 13 May 4-8  


Final Exam: Thursday, May 14, 9 AM