Announcements

Final review

Instructors will hold multiple final exam review sessions next week. There is no official presentation in the review sessions. Bring your questions. We will poll for questions at the start of the session and try to answer as many as we can. Additionally we will have smaller drop in office hours.

Table 1. Review sessions
Date Time Location Staff

Mon 6 May

1:30-3:30pm

SCI 256

Tia

Tue 7 May

3-5pm

SCI 204

Chris

Wed 8 May

1-3pm

SCI 204

Andrew

Sci 204 is upstairs from the SCI coffee bar near the Cornell library.

Table 2. Office hours
Date Time Location Staff

Mon 6 May

9am-10am

SCI 247

Andrew

Mon 6 May

11am-Noon

SCI 247

Andrew

Tue 7 May

10am-noon

SCI 252D

Chris

Tue 7 May

1-3pm

SCI 252B

Jocelyn

Wed 8 May

10am-noon

SCI 257

Lauri

Thu 9 May

11:30am-12:30pm

SCI 249

Tia

Course Info

Welcome to CS21. This course will introduce fundamental ideas in computer science while also teaching you how to write computer programs. We will study algorithms for solving problems and implement solutions in the Python programming language. Python is an interpreted language that is known for its ease of use. We also introduce object-oriented programming and data structures. A deeper coverage of these topics will be presented in CS 35.

This course is appropriate for all students who want to learn how to write computer programs and 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 CS31 or CS35.

Meeting Times:

Table 3. Course Meeting Times
Section Days Time Room Instructor Ninjas

1

MWF

8:30am - 9:20am

SCI 256

Andrew Danner

Jenna, Iz, Gia

2

MWF

9:30am - 10:20am

SCI 256

Chris Murphy

Ernesto, Sofie, Tommy

3

MWF

11:30am - 12:20am

SCI 256

Tia Newhall

V, Bohou, Yara

Table 4. Lab Meeting Times
Lab Day Time Room Instructor Ninja

A

T

1:05pm - 2:35pm

SCI 256

Andrew Danner

Iz

B

T

2:45pm - 4:15pm

SCI 256

Jocelyn Corey

Nick

C

W

1:15pm - 2:45pm

SCI 256

Tia Newhall

Ernesto

D

W

3:00pm - 4:30pm

SCI 256

Chris Murphy

Jayden

Support Staff & Office Hours

Table 5. Office Hours
Name Office Hours Location

Lauri Courtenay

Fri 1-3p

SCI 257

Andrew Danner

Thu 10a-Noon

SCI 247

Tia Newhall

Wed 3:00-4:00p, Fri 4:00-5:00p

SCI 249

Chris Murphy

Thu 2:30-4:30p

SCI 252D

Jocelyn Corey

Fri 10:30-12:30

SCI 252B

Students can attend any office hour session regardless of lecture/lab section. If you cannot meet during the posted times, please reach out to us to schedule an appointment.

Academic Support Coordinator: Lauri Courtenay

Student assistants/Ninjas: Sofie Aird, Jayden Booker, V Buckley, Nicholas Fettig, Tommy Hoang, Ernesto Garza, Gia Kwon, Iz Lee, Jenna Martinez, Yara Shobut, Lila Traves, Bohou Zhang

Textbook

Book Cover

We will primarily be using the online book How to think like a computer scientist: Learning with Python by Elkner, Downey and Meyers.

See the Schedule for each week’s reading assignment.

Here are a few other useful online resources:

Course Goals

By the end of the course, we hope that you will have developed the following skills:

  • Given a program, simulate on paper how a computer would execute the program and show the results that it would produce.

  • Given a pseudocode algorithm, successfully implement it in Python.

  • Given a problem, design a clear, concise, and correct pseudocode algorithm to solve it.

  • Use top-down design to sub-divide a large problem into reasonably-sized modular sub-problems.

  • Given several algorithms for solving the same problem, analyze which algorithm would be more efficient in terms of running time.

  • Develop debugging and unit testing skills. Consistently use these skills while implementing programs.

Schedule

WEEK DAY ANNOUNCEMENTS TOPIC & READING LABS
1

Jan 22

 

Course Introduction

Lab 0: Linux, editing


In Class

Jan 24

 

Jan 26

 
2

Jan 29

 

Numbers, Strings, and Loops

Lab 1: First programs


In Class

Jan 31

 

Feb 02

Drop/Add Ends

3

Feb 05

 

Conditions and Boolean Logic

Lab 2: Numbers, strings, and for loops


In Class

Feb 07

 

Feb 09

 
4

Feb 12

 

First Functions, while Loops

Lab 3: conditionals and boolean operators



In Class

Feb 14

 

Feb 16

Quiz 1 (study guide)

5

Feb 19

 

Graphics, Using Objects

Lab 4: functions



In Class

Feb 21

 

Feb 23

 
6

Feb 26

 

Fruitful Functions

Lab 5: Graphics



In Class

Feb 28

 

Mar 01

Quiz 2 (study guide)

7

Mar 04

 

Top-Down Design

Lab 6: Functions and lists



In Class

Mar 06

 

Mar 08

 
 

Mar 11

Spring Break

Mar 13

Mar 15

8

Mar 18

 

More Top-Down Design

Lab 7: Top Down Design Part 1



In Class

Mar 20

 

Mar 22

Quiz 3 (study guide)

9

Mar 25

 

Searching

Lab 7: Top Down Design Part 2



In Class

Mar 27

 

Mar 29

Last Day to Declare CR/NC

10

Apr 01

 

Sorting

Lab 8: Searching



In Class

Apr 03

 

Apr 05

Quiz 4 (study guide)

11

Apr 08

 

Recursion

Lab 9: Sorting



In Class

Apr 10

 

Apr 12

 
12

Apr 15

 

More Recursion

Classes and Objects

Lab 10: Recursion



In Class

Apr 17

 

Apr 19

 
13

Apr 22

 

More Classes and Objects

Lab 11: Classes and Objects



In Class

Apr 24

 

Apr 26

Quiz 5 (study guide)

14

Apr 29

 

Additional Data Structures

[Lab 11 cont]



In Class

May 01

 

May 03

 
 

May 09

Final exam 2-5pm in SCI 101.

Grading Policies

Grades will be weighted as follows:

Table 6. Grading Percentages
Weight Category

35%

Lab assignments

30%

Quizzes

30%

Final Exam

5%

Class Participation

Quizzes and Final Exam

Quizzes will be administered in class on the days indicated on the schedule. Please look over these dates carefully and contact the professor well in advance if you cannot be in class for a quiz.

If you are not present on the day of a quiz, and you do not let us know ahead of time that you are missing class, you will receive a zero for that quiz.

There will be one final exam for the semester. Details and dates will be released during the semester. Please read the section on accommodations if you are in need of extra time. You must inform us of accommodations or conflicts at least 2 weeks in advance of the lab, quiz or exam that you are requesting accommodations for.

We encourage you to visit the ninja sessions and instructor office hours to prepare and study for quizzes and the 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. You must attend the lab session for which you are enrolled.

Lab assignments will typically be released on Sunday at the beginning of the week and will be due by midnight on Saturday unless otherwise noted on the syllabus. You are strongly encouraged to start early and to attend the ninja sessions for extra practice.

You will submit your assignments electronically using the handin21 program. You may submit your assignment multiple times, and a history of previous submissions will be saved. You are encouraged to submit your work regularly.

Late Policy

Labs will typically be due Saturdays before midnight. Late submissions will not be accepted. Even if you do not fully complete a lab assignment you should submit what you have done to receive partial credit.

The CS labs are open 24 hours a day, 7 days a week for you to use for CS21 lab assignments. You can use your OneCard to gain access to the labs anytime between 7am and midnight. You can stay in the lab as long as you would like, but If you leave the lab after midnight, you will not be able to get back in until 7am. Alternatively you can always access the lab machines from your personal computer using SSH and/or a terminal from Visual Studio Code.

If you feel that you need an extension on an assignment or that you are unable to attend class for two or more meetings due to a medical condition (e.g., extended illness, concussion, hospitalization) or other emergency, you must contact the dean’s office and your instructors. Faculty will coordinate with the deans to determine and provide the appropriate accommodations. Note that for illnesses, the College’s medical excuse policy states that you must be seen and diagnosed by the Worth Health Center if you would like them to contact your class dean with corroborating medical information.

Academic Integrity

Academic honesty is required in all your work. Under no circumstances may you hand in work done with or by someone else under your own name. Discussing ideas and approaches to problems with others on a general level is encouraged, but you should never share your solutions with anyone else nor allow others to share solutions with you. You may not examine solutions belonging to someone else, nor may you let anyone else look at or make a copy of your solutions. This includes, but is not limited to, obtaining solutions from students who previously took the course or solutions that can be found online. The use of generative AI (e.g., chatGPT or GitHub CoPilot) is also considered to be unauthorized collaboration with an outside source and is a violation of our academic integrity policy.

You may not share information about your solution in such a manner that a student could reconstruct your solution in a meaningful way (such as by dictation, providing a detailed outline, or discussing specific aspects of the solution). You may not share your solutions even after the due date of the assignment.

In your solutions, you are permitted to include material which was distributed in class, material which is found in the course textbook, and material developed by or with an assigned partner. In these cases, you should always include detailed comments indicating on which parts of the assignment you received help and what your sources were.

When working on quizzes, exams, or similar assessments, you are not permitted to communicate with anyone about the exam during the entire examination period (even if you have already submitted your work). You are not permitted to use any resources to complete the exam other than those explicitly permitted by course policy. (For instance, you may not look at the course website during the exam unless explicitly permitted by the instructor when the exam is distributed.)

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.

This policy applies to all course work, including but not limited to code, written solutions (e.g. proofs, analyses, reports, etc.), exams, and so on. This is not meant to be an enumeration of all possible violations; students are responsible for seeking clarification if there is any doubt about the level of permissible communication.

The general ethos of this policy is that actions which shortcut the learning process are forbidden while actions which promote learning are encouraged. Studying lecture materials together, for example, provides an additional avenue for learning and is encouraged. Using a classmate’s solution, however, is prohibited because it avoids the learning process entirely. If you have any questions about what is or is not permissible, please contact your instructor.

Regret clause for lab assignments

If you commit some act that is a violation of the integrity policy (or, if you are unsure if it violates the policy) but bring it to the attention of the course’s instructors within 48 hours, the course may impose local sanctions that may include an unsatisfactory or failing grade for work submitted, but the course will not refer the matter for further disciplinary action except in cases of repeated acts. The regret clause applies to lab assignments only.

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 CS21 Ninjas will assist us in class and run evening study sessions.

The CS21 Ninjas (student mentors) are: Sofie Aird, Jayden Booker, V Buckley, Nicholas Fettig, Tommy Hoang, Ernesto Garza, Gia Kwon, Iz Lee, Jenna Martinez, Yara Shobut, Lila Traves, Bohou Zhang.

Ninja Study Sessions

You are invited — and encouraged — to participate in Ninja 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:

Table 7. Ninja Session Times
Weekly Ninja Sessions (meets in SCI 256)

Thursdays

7:00 PM - 10:00 PM

Fridays

7:00 PM - 9:00 PM

EdSTEM

In addition to the office hours, ninja sessions, and other in-person resources, this semester we’re using an EdSTEM course discussion forum. You can post questions to EdSTEM at any time, and you may do so anonymously to classmates and/or privately (to instructors only). If you have questions that you feel the whole class would benefit from (e.g., lab clarifications), please post them here so that everyone can learn from the discussion.

Please keep in mind the following guidelines:

  1. EdSTEM should be used for ALL content and logistics questions outside of class, lab, office hours, and ninja sessions. Please do not email instructors or ninjas with your code or questions about the assignments. All of the course staff can see questions on EdSTEM, so you’ll likely get a faster response than direct email.

  2. If there is a personal issue that relates only to you, please email your instructor.

  3. We encourage non-anonymous posts (which will count towards participation), but you may post anonymously. Abuse will not be tolerated.

  4. Do NOT post long blocks of code on EdSTEM - if you can distill the problem to 1-2 lines of code and an error message, that’s fine, but try to avoid giving out key components of your work.

  5. By the same token, when answering a question, try to give some guiding help but do not post code fixes or explicit solutions to the problem.

Academic Accommodations

If you believe you need accommodations for a disability or a chronic medical condition, please contact Student Disability Services (via email at studentdisabilityservices@swarthmore.edu) to arrange an appointment to discuss your needs. As appropriate, the office will issue students with documented disabilities or medical conditions a formal Accommodations Letter. Since accommodations require early planning and are not retroactive, please contact Student Disability Services as soon as possible.

For details about the accommodations process, visit the Student Disability Services website.

To receive an accommodation for a course activity, you must have an official accommodation letter from the Office of Student Disability Services and you need to meet with course staff to work out the details of your accommodation at least two weeks prior to the activity.

You are also welcome to contact any of the course staff privately to discuss your academic needs. However, all disability-related accommodations must be arranged, in advance, through Student Disability Services.

How to Succeed in CS21

  • Attend class.

    The primary introduction to course material is through class lecture. Additionally, we often do lab exercises during class. This is an important part of the learning process, as these exercises give you immediate experience with the material we are covering.

  • Before class: read the textbook

    Don’t worry about total comprehension, but at least get a feel for what we will be covering that week. If you have some understanding of the material before attending class, it will be easier for you to complete the exercises and ask questions.

  • Ask questions if you don’t understand

    There are lots of opportunities for you to ask questions: attending class, attending lab, office hours, and ninja sessions. This class continually builds on previous material, so if you don’t understand something one week, it will continue to be a problem the next week, and the week after that, and so on.

  • Start the lab assignments early

    Before attending lab each week, you should read through the lab assignment and begin sketching out a solution, on paper or in python. If you get stuck early (i.e., not two hours before it is due), there will be time to get help from the CS21 support staff and ninjas. Starting early also means you can take a break, go do something else, and come back later. We find we always have at least a few new ideas when coming back to a problem after a break.

  • Practice, practice, practice

    The only way to effectively learn the material and succeed on the quizzes and final exam is to consistently do the exercises and labs. Finish all of these programs — and do some extras, for fun! Even if you don’t get them done on time, they will still help you learn the material.

  • Attend Labs and Ninja Sessions

    Lab attendance is required. The student Ninjas hold evening study sessions each week. You are encouraged to participate in these sessions. The Ninjas will help you prepare for quizzes, will provide additional instruction in programming concepts, and will provide friendly assistance on your lab assignments.

Programming Style

Programming is not a dry mechanical process, but a form of art. Well written code has an aesthetic appeal while poor form can make other programmers and instructors cringe. Programming assignments will be graded based on style and correctness. Good programming practices usually include many of the following principles:

  • A comment at the top of the program that includes:

    • Program authors

    • Date or Dates

    • A brief description of what the program does

  • Concise comments that summarize major sections of your code

  • Meaningful variable and function names

  • Function comments that include:

    1. description of what function does

    2. description of input value(s) (parameter values)

    3. description of return value

  • Well organized code

  • White space or comments to improve legibility

  • Avoidance of large blocks of copy-pasted code

Remote Access Using vscode

CS labs are accessable for you to use 24 hours a day, 7 days a week. You can access CS labs using your OneCard.

For CS21, the easiest way to connect to the CS machines from your own laptop is to install Visual Studio Code and set it up to remotely access your files. To do this, follow the instructions on how to setup Visual Studio Code for remotely accessing the CS department.

You can also remotely access the CS lab machines using ssh. However, you cannot easily run the code editor remotely connecting in this way. Directly ssh’ing into CS lab machines is useful if you want to run shell commands, or if you use a different editor like vim or emacs.

Links that are related to the course may be posted here. If you have suggestions for links, let us know.