Introduction to Computer Science:
The Way of the Program

Sarah Lawrence College
Fall 2023


Computer science is no more about computers than astronomy is about telescopes.

—Edsger W. Dijkstra

Course Description

This lecture course is a rigorous introduction to computer science and the art of computer programming, using the elegant, eminently practical, yet easy-to-learn programming language Python. We will learn the principles of problem solving with a computer while gaining the programming skills necessary for further study in the discipline. We will emphasize the power of abstraction and the benefits of clearly written, well-structured programs, beginning with imperative programming and working our way up to object-oriented concepts such as classes, methods, and inheritance. Along the way, we will explore the fundamental idea of an algorithm; how computers represent and manipulate numbers, text, and other data (such as images and sound) in binary; Boolean logic; conditional, iterative, and recursive programming; functional abstraction; file processing; and basic data structures such as lists and dictionaries. We will also learn introductory computer graphics, how to process simple user interactions via mouse and keyboard, and some principles of game design and implementation. All students will complete a final programming project of their own design. Weekly hands-on laboratory sessions will reinforce the concepts covered in class through extensive practice at the computer.

Open to any interested student.

Instructor

Prof. Jim Marshall
Office: Ilchman Science Center 100
Phone: 2673 (from off campus: 914-395-2673)
Email: j + my last name + @sarahlawrence.edu

Class Meeting Times

Textbooks

REQUIRED
Python Programming, 3rd Edition
by John Zelle
OPTIONAL
Think Python, 2nd Edition
by Allen B. Downey

Course Structure

Weekly rhythm: Learning to program in Python is like climbing a staircase. You can't reach the higher steps if you don't first make it up the lower steps. Each week, we will take the next step up the staircase by studying a new set of programming concepts, but the new concepts will always build on concepts from previous weeks. Each Tuesday in lecture, I will introduce the new concepts for that week. On Wednesday, you will practice these concepts during your lab session. In lecture on Thursday, we will go into more depth and see further examples, after which I will post your homework assignment, which will be due the following Tuesday night. This weekly rhythm will continue throughout the semester. During the final three weeks, you will have the opportunity to create a substantial program of your own design.

Lab sessions: In addition to the Tuesday/Thursday lectures, you will have a lab session each week on Wednesday, starting either at 9:30 am or 2:00 pm. The lab sessions are mandatory, but you only need to attend one lab session per week. The purpose of the labs is to give you time for hands-on, structured practice with Python programming, and the opportunity to ask questions and receive individualized help. At the beginning of each lab session, I will hand out a worksheet with a set of programming exercises for you to work on at your own pace or with a lab partner. The lab exercises will typically be due the following week as part of your homework assignment.

Group conferences: In addition to the lectures and labs, two 1-hour group conference sessions will be held each week on Friday, for students desiring extra practice and discussion of the course concepts. Together we will go over your questions, review material from class, and work through further examples, but I will not introduce new course material. Group conferences will usually be optional, and any student is welcome to attend. However, depending on your own rate of progress with the course material as the semester proceeds, I may require you to attend one session per week. Therefore, all students enrolling in the course must ensure that their weekly schedule does not conflict with at least one of the Friday group conference meeting times.

Attendance Policy

On-time attendance is required and expected for all lectures and lab sessions. Given the fast-paced, cumulative nature of the course material, students who miss class risk quickly falling behind, and catching up can be difficult. At the beginning of each lecture, I will pass around an attendance sheet, which you should make sure to sign. If you arrive late and forget to sign the sheet, you will most likely be counted as absent that day. Although I realize that missing class sometimes cannot be avoided, your cumulative attendance record in lecture and lab will count as part of your final course grade. Missing lab sessions will be particularly detrimental to your grade. If you are unable to attend lecture or lab, please contact me about it as soon as possible. No student will be admitted to the course after the add/drop period ends.

Quizzes

During weeks 3 through 9 of the course, we will have a 25-minute written quiz in class every other Thursday (see the Calendar for the exact dates). For each quiz, you will be expected to read, write, and understand short pieces of Python code, without the use of your computer, phone, textbook, classmates, or any other devices or supporting materials. The quizzes are intended to serve as a "reality check" to assess how well you have understood basic programming concepts. They will not be difficult if you have been keeping up with the course material. However, based on your performance on the quizzes (or homework assignments), I may ask you to begin attending one of the weekly group conference sessions. The best way to prepare for the quizzes is to do the lab and homework assignments consistently each week, and to review the Discussion Questions at the end of each chapter in the textbook. At the end of the semester, I will drop your lowest quiz score. No make-up quizzes will be given under any circumstances, so plan accordingly.

Email

I will often send out announcements to the class through email, so you are expected to check your Sarah Lawrence email account at least once per day. I will use your @gm.slc.edu address because it is reliable and easy to remember. You should also check the course web pages frequently for code examples discussed in lecture, and for the homework assignments. I will be happy to answer your questions by email and will try to respond as quickly as possible to messages that pertain to the course.

Homework Assignments

The Mini-Project

Toward the end of the semester, you will have an opportunity to go beyond the assigned homework exercises by developing and implementing a substantial program of your own design. This will allow you to synthesize the programming concepts you've learned in class in a more creative and personal way, according to your own interests. There are many possibilities: games, graphics, simulations, etc. — your imagination is the limit. You will have three weeks to work on your mini-project. A short written project proposal will be due by the beginning of Thanksgiving break, and your completed program in final working form, along with a short project writeup, will be due on the last day of the semester (Friday, December 15). More information about the mini-project will be provided in class.

Good Programming Style

Your programs will be evaluated on both functionality and style. As expert programmers know, programming is about more than just getting your code to run correctly on a computer. It is a highly creative activity akin to an art form, which relies as much on a sense of aesthetics and style as on technical mastery of the programming language. Programs should be written primarily for other programmers to read and understand, and only incidentally for machines to execute. Thus it is very important for you to develop a clear and consistent programming style, making good use of comments, white space, and well-chosen variable names. Your code should follow these general stylistic guidelines:

Homework Evaluation Scale

Homework assignments are evaluated on both the functionality and style of your code, according to the following rubric. To receive a ☆, your code must not only work perfectly, it must also be logically well-organized and easy to read (see the above stylistic guidelines).

Work of excellent quality that clearly meets or exceeds all of the assignment expectations. All programs work correctly on all of the input data, and are written in a clear, easy-to-read style.
✓+ Work of very good quality that meets most of the assignment expectations. Programs work correctly or mostly correctly for most of the input data, though some programs may have a few minor deficiencies or stylistic problems.
Work of satisfactory quality that meets some of the assignment expectations and reflects a good effort overall, despite some deficiencies. Some programs work correctly or mostly correctly for most of the input data, but may have significant stylistic problems or other shortcomings.
✓− Work of subpar quality that falls short of assignment expectations and needs improvement. Some programs have serious deficiencies, and work incorrectly for a significant portion of the input data. Nevertheless, the work shows some degree of effort and understanding.
Work of poor quality that exhibits severe problems, reflecting minimal effort or understanding. Many programs crash or work incorrectly for most or all of the input data.

Getting Help

At times you may find some of the course material to be quite daunting. But don't be discouraged! If you find it difficult, most likely so does the rest of the class. This is just a normal part of the process of learning to program. You are strongly encouraged to contact me as soon as possible whenever you are having difficulty with the material. You should also be sure to attend one (or even both) of the weekly group conference sessions, during which we will discuss whatever concepts students are having trouble with, and work on practice exercises together. In short, if you are confused about something, don't stay that way! Staying confused will only make things worse later (remember the staircase metaphor). Contact me as soon as possible so that we can clear up the problem. There is no point in staring at the computer screen for hours trying to figure out why your code won't work, when just a few minutes is often all it takes to track down the problem together. I'll also be happy to answer questions over email or schedule a meeting with you on Zoom.

Python Tutoring Hours

Our lab assistants will be available this semester for informal help and tutoring with Python programming, according to the following schedule. All tutoring will take place in the Learning Commons space on the main floor of the SLC Library. This service is free, and no appointment is necessary.

How to Succeed in This Course

Accommodations

If you have a disability that may interfere with your ability to participate in the activities, coursework, or assessment of the objectives of this course, or any of your other courses, you may be entitled to reasonable accommodations. Please contact the Office of Access and Disability Services, located in Westlands, by calling 914-395-2235 or emailing disabilityservices@sarahlawrence.edu. Under the Americans with Disabilities Act and Section 504 of the Vocational Rehabilitation Act of 1973, all students, with or without disabilities, are entitled to equal access to the programs and activities of Sarah Lawrence College and the College will make reasonable accommodations when appropriate and necessary.

Collaboration Policy and Academic Honesty

The highest level of academic integrity is expected of every student. You are strongly encouraged to discuss ideas and approaches to solving problems on a general level with your fellow classmates, but you are not allowed to share your program files, code, or solutions with others, or to make use of another student's code or solutions obtained via email, the Internet, or any other means of communication. I can almost always tell when two different programs derive from the same original source code, even if cosmetic changes have been made to it. The code you hand in must have been written by you from scratch, with the following permitted exceptions: code provided in class by me, code from the textbook, or code developed together with a partner if you are collaborating on a lab or project with my knowledge. In this case, you and your partner may freely exchange code developed as a team, and are jointly responsible for the work submitted. Under no circumstances may you hand in work under your own name that was done by someone other than yourself or your partner.

In all cases, if you make use of any code that was written by someone else in your assignment, including your partner (or something else, like a chatbot), you must clearly acknowledge this in your code. This also goes for any help obtained via the Internet, including from StackOverflow or ChatGPT. Always credit the people or sources from whom you got help, including the course tutors. If you are ever unsure about what constitutes acceptable collaboration, just ask. You are also responsible for carefully reading the College's official Policy on Academic Integrity in your SLC Student Handbook. Failure to abide by these rules is considered plagiarism, and will result in severe penalties, including possible failure in the course. Please do not put me, yourself, or anyone else in this unpleasant situation!