CS21: Introduction to Computer Science
Fall 2014

Schedule | Grading Policies | Academic Integrity | Student Support | Tips for Success


  • An optional Lab 11 for practicing with linked lists is posted.

  • Dec. 09 (Tu): Review session 1:05-4:15pm in SCI 240.

  • Dec. 11 (Th): Office hours 1:30-3:30pm in SCI 243.

  • Dec. 12 (Fr): Final Exam 7:00-10:00pm in SCI 101, Study Guide

Course Information

Section 1: MWF 10:30 – 11:20am SCI 256
Professor: Lisa Meeden
Piazza: Question and answer forum for the class
Office: SCI 243
Phone: 8565
Office hours: Wednesdays 2-4pm or stop by anytime my door is open


Welcome to cs21. This course will introduce fundamental ideas in computer science while also teaching you how to write computer programs. You will study algorithms for solving problems and learn how to implement solutions in the Python programming language. We also introduce object-oriented programming and data structures. A deeper coverage of these topics will be presented in cs35.

This course is appropriate for all students who want to learn how to write computer programs and how to think like computer scientists. it is the usual first course for computer science majors and minors. Students with advanced placement credit or extensive programming experience should place out of this course and instead begin with either cs31 or cs35.


There is no required textbook for this course. There are, however, required readings! See the Schedule for each week's reading assignment. We will primarily be using the online book How to think like a computer scientist: Learning with Python by Elkner, Downey and Meyers.

Here are a few other useful online python resources:

Goals for the course

Grading Policies

Grades will be weighted as follows:
5%Class Participation
40%Lab assignments
25%Final Exam

Lab Policy

This course features weekly lab assignments which are the largest component of your course grade. Lab attendance is required by all students, unless you have already completed and submitted the lab assignment for the week. You must attend the lab session for which you are enrolled:

Weekly Lab Sessions
Lab A: Tues. 1:05—2:35pm Knerr Science Center 256
Lab B: Tues. 2:45—4:15pm Knerr Science Center 256
Lab C: Thur. 1:05—2:35pm Ngai Science Center 240
Lab D: Thur. 2:45—4:15pm Meeden Science Center 240

Lab assignments will typically be posted on the web by Sunday afternoon and will be due before midnight on Saturdays. You are strongly encouraged to start early and to attend the study sessions for extra practice. You will submit you assignments electronically using the handin21 program. You may submit your assignment multiple times, and a history of previous submission will be saved. You are encouraged to submit your work regularly.

Late assignments will only be accepted if you contact the professor at least a day before the deadline with a legitimate reason for needing extra time, such as an illness or needing to leave campus. Even if you do not fully complete an assignment, you should submit what you have done to receive partial credit.

Quiz Policy

Quizzes will be given at the beginning of class on the days posted in the Announcements section of the Schedule. Please look at these dates carefully and contact me in advance if you cannot be in class for a quiz.

Academic Integrity

Academic honesty is required in all of your work. Under no circumstances may you hand in work done with (or by) someone else under your own name. Your code should never be shared with anyone; you may not examine or use code belonging to someone else, nor may you let anyone else look at or make a copy of your code. This includes, but is not limited to, obtaining solutions from students who previously took the course or code that can be found online. You may not share solutions after the due date of the assignment. However, discussing ideas and approaches to problems with others on a general level is fine, in fact, we encourage you to discuss general strategies with each other.

All code you submit must be your own with the following permissible exceptions: code distributed in class, code found in the assigned readings for the course, and code worked on with an assigned partner. In these cases, you should always include detailed comments that indicates on which parts of the assignment you received help, and what your sources were.

Failure to abide by these rules constitutes academic dishonesty and will lead to a hearing of the College Judiciary Committee. According to the Faculty Handbook: "Because plagiarism is considered to be so serious a transgression, it is the opinion of the faculty that for the first offense, failure in the course and, as appropriate, suspension for a semester or deprivation of the degree in that year is suitable; for a second offense, the penalty should normally be expulsion." Be aware that we will be routinely running plagiarism detection software on the lab solutions of students from all sections of cs21.

Please contact me if you have any questions about what is permissible in this course.

Student Support

Lauri Courtenay is the CS Department's Academic Support Coordinator. She will be working closely with our student mentors, also known as Ninjas, to help you learn how to program and think like a computer scientist. The Ninjas for this semester are: Isabel (Izzi) Baskin, Alexander Simms, Afua (Dee) Ahima, Allison Ryder, Daniel Redelmeier, and Justin Cosentino.

Study sessions

You are invited, and encouraged, to participate in Ninja evening study sessions to prepare for quizzes, to discuss programming concepts, and to get friendly assistance in working on lab assignments. Our CS mentoring team is dedicated to helping students, who have no prior knowledge of computer science, learn to program in Python while keeping their senses of humor intact. As an added bonus, free snacks will be provided at the sessions. The sessions are held:

Weekly Evening Ninja Sessions
Mondays 7—9pm Sci Center 256
Thursdays 7—10pm Sci Center 256

Accessing the CS labs after hours

You can use your ID to gain access to the computer labs at nights and on the weekends. Just wave your ID over the microprox reader next to the lab doors. When the green light goes on, just push on the door handle to get in (the door knob will not turn). If the green light doesn't go on, then we need to enter your microprox number into the system. Email local-staff@cs.swarthmore.edu if you have problems with this. If the building is locked, you can use your ID to enter the door between Martin and Cornell library. For this class, your ID will give you access to the labs in rooms 238, 240, and 256.

Academic Accommodations

If you believe that you need accommodations for a disability, please contact Leslie Hempling in the Office of Student Disability Services (Parrish 113) or email lhempli1@swarthmore.edu to arrange an appointment to discuss your needs. As appropriate, she will issue students with documented disabilities a formal Accommodations Letter. Since accommodations require early planning and are not retroactive, please contact her as soon as possible. For details about the accommodations process visit Student Disability Services.

Tips for Success in cs21



Sep 01

  Introduction to Python and Unix
  • Learning with Python Chapter 1: The way of the program
  • Unix vs Python shell
  • Data types
  • Variables and assignment
  • Built-in functions type(), int(), float(), str(), raw_input(), input()
  • for loops, sequences
Lab 0: Unix and editing

Sep 03


Sep 05


Sep 08

  Writing simple programs Lab 1: First programs

Sep 10


Sep 12

Drop/Add ends


Sep 15

Quiz1 topics

if-else; Booleans Lab 2: Numbers and strings

Sep 17

Quiz 1

Sep 19


Sep 22

  First functions, While loops Lab 3: Conditionals, if

Sep 24


Sep 26


Sep 29

Quiz2 topics

Graphics; Using objects Lab 4: while loops

Oct 01

Quiz 2

Oct 03


Oct 06

  Functions Lab 5: Using graphics

Oct 08


Oct 10


Oct 13

Fall Break

Oct 15

Oct 17


Oct 20

Quiz3 topics

Top-down design; File input/output Lab 6: Defining functions

Oct 22

Quiz 3

Oct 24


Oct 27

  Searching, Analysis of algorithms Lab 7: Top-down design

Oct 29


Oct 31


Nov 03

Quiz4 topics

Sorting, Analysis of algorithms Lab 7 continued

Nov 05

Quiz 4

Nov 07

Last day to declare CR/NC or W


Nov 10

  Recursion Lab 8: Using search/sort

Nov 12


Nov 14


Nov 17

Quiz5 topics

Defining new classes Lab 9: Using recursion

Nov 19

Quiz 5

Nov 21


Nov 24

  More on classes None

Nov 26


Nov 28

Thanksgiving Break


Dec 01

Quiz6 topics

Linked lists Lab 10: Defining objects

Dec 03

Quiz 6

Dec 05


Dec 08

  Wrap up Lab 11: Using linked lists

Dec 12

Final Exam 7-10pm in SCI 101