Computer Science 150
Introduction to Computer Science
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.
You are not required to read the Zelle book. Anything you need to know for this course will be covered in the lecture and most things will also be covered in the labs. On the class homepage you will find a link to several hundred pages of notes on Python programming that I have written; I will occasionally make reading assignments in these notes. The advantage of the Zelle book is that it gives alternative presentations of the class concepts. I recommend it.
We will have 11 labs, most of which have prelab assignments and all of which have postlabs.. None of this is 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 from the previous week 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 2 "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. I use them primarily at the end of the semester to get a sense of which of the labs need updating, rewriting, or complete replacement.
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:
- Labs: 40%
- Prelabs 9%
- Postlabs 2%
- Class participation 5%
- In-class exams 12% each
- Final exam 20%
Note that the final exam will be Wednesday, December 13 at 2pm. 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 Registrar 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. 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 Sam Taggart 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.
Aug 28-Sept 1
Introduction to Python
Data types, program structure
Notes: Chapters 1, 2
Lab 1: Hello World!
Loops and Lists
Lab 2: The Basics
More with lists
Notes: Sections 6.2, 7.4
Lab 3: Loops and Graphics
Notes: Sections 4.1, 4.2, 4.3
Lab 4: Functions, Pictures, and the Mastermind Game
No class on Friday Sept 22
Reading from Files
Parameters, Arguments and Returns
Notes: Sections 4.4, 4.5, 7.1, 7.3
Lab 5: Image Manipulation
Designing code with functions
Notes: Chapter 4 again
No lab this week!
Notes: Chapter 7
Lab 6: Recursive Madness
Data Structures: dictionaries and sets
Notes: Chapter 6
Lab 7: Data Structures and Concordances
Oct 30-Nov 3
Notes: Sections 8.1, 8.2
Lab 8: Data Structures and Wordgames
Objects, Methods and Constructors
Notes: Sections 8.2, 8.3
Lab 9: Digital Audio
Subclasses and Inheritance
Notes: Section 8.4
Lab 10: The Critter Tournament
Read Notes: Section 8.5
No lab this week!
Nov 27-Dec 1
Lab 11: Object-Oriented Design
Final Exam: Wednesday, December 13, 2pm