**CS1: Introduction to Programming & Computation** *Spring 2021* - [Dartmouth College](http://www.dartmouth.edu) -- Prof. [Wojciech Jarosz](http://cs.dartmouth.edu/~wjarosz) CS 1 will teach you to design, write, and analyze code to solve computational problems from a range of disciplines. You'll also learn to think about problems the way a computer scientist thinks -- a skill that is valuable in any field. The course is suitable for students with no previous background in Computer Science, and no knowledge of mathematics beyond high-school algebra. CS 1 fulfills the TLA distributive requirement, and is the introductory course for the Computer Science major and minor. Administrative details ===================================================================== Lecture location --------------------------------------------------------------------- Via Zoom meeting. Link posted on [Canvas homepage](https://canvas.dartmouth.edu/courses/46160/assignments/syllabus). Class times --------------------------------------------------------------------- * MWF 1:10 pm to 2:15 pm, x-hour: Tuesday 1:40 to 2:30 pm Textbook and software --------------------------------------------------------------------- There is a free on-line textbook for the course, [Project Python](http://projectpython.net). Links to the relevant sections of the text will be posted for each lecture on the [schedule page](../schedule/). We wrote the text as lecture notes for this course. !!! Tip Reading the text and doing the exercises in it daily are necessary to do well in this course. We will be using PyCharm to edit and run code. You will install this software on your own computer as part of the first short assignment. All documents, video recordings, class examples, lab assignments, short assignments, and sample solutions related to the course will be either on the site you are viewing now (I recommend that you use Chrome to view this site as some of the interactive features are not compatible with all browsers) or on the course Canvas page. Course staff --------------------------------------------------------------------- Professor : Wojciech Jarosz TA : Sean Paulsen Section leaders : Kathy Cui, : Brandon Guzman, : Henry Kim, : Eunice Kweon, : Rachael Williams, : Ikeoluwa Abioye Recitation section --------------------------------------------------------------------- !!! Warning **You are required to attend a one-hour recitation section meeting each week.** Attendance is mandatory; section leaders will take attendance. During your weekly recitation sections you will solve small problems, either programming or written work. You must have your laptop, with all the CS1 software installed, available during recitation. You must attend your own recitation to be marked as present. **Recitation sections will begin the week of Monday, April 5th, 2021.** You will be assigned a section based on your availability and timezone. You will fill out a form listing your availability for sections as part of [Short Assignment 0](../sa00/) Lecture --------------------------------------------------------------------- I like it when you **ask questions during lecture**. Chances are that if you have a question, then at least one other student has the same question. In a remote learning setting it is very easy to get distracted by your environment, including other open windows on your laptop and your phone. Try your best to avoid any possible distraction during the class Zoom meetings. Research shows that having your video turned-on helps you to stay engaged during an online meeting. I strongly encourage you to do so. Coursework and grading ===================================================================== As a part of this course there will be 9 short assignments, 4 labs, 8 recitations, and 5 exams. These will be weighted as follows: Grading Component | Percentage ------------------------|------------- Short assignments | 10% Labs: | 38% Recitation: | 2% Exams (best 4 out of 5) | 50% I will be following an absolute grading policy for assigning a letter grade in this course: Grade | Percentage ------|------------------------------ A | final score ≥ 97% A- | 97% > final score ≥ 91% B+ | 91% > final score ≥ 86% B | 86% > final score ≥ 81% B- | 81% > final score ≥ 76% C+ | 76% > final score ≥ 71% C | 71% > final score ≥ 66% C- | 66% > final score ≥ 60% D | 60% > final score ≥ 55% E | 55% > final score Exams --------------------------------------------------------------------- There will be five exams and only the best four scores will count towards your final grade. I will announce the dates for first four exams during the term and the fifth exam will be scheduled on the day of the final exam. The final exam is scheduled by the Registrar. Short assignments --------------------------------------------------------------------- Short assignments are relatively brief exercises that are usually due in two or three days. Short assignments will usually consist of one or two short programs to help you understand the concept being covered. You will have 2 extensions (up to 24 hours for each extension) that you can use for short assignments. Section leaders will grade your short assignments on a scale of 0 to 5. Lab assignments --------------------------------------------------------------------- There will be four in-depth lab assignments; you will have one week to work on each lab. You may use your own computer wherever you like, just as you do for short assignments. Lab assignments require a significant time commitment. Start early, and if you need to, get advice from me, the section leaders or the TAs. For each lab, there will also be a checkpoint, due a few days after the lab is assigned. Checkpoints will be graded as part of your lab grade. You will have 2 extensions (up to 24 hours) that you can use for lab assignments. Extra credit --------------------------------------------------------------------- Some of the assignments may suggest extra credit work. Extra credit in this course will be tallied separately from regular scores. If you end up on a borderline between two grades at the end of the course, extra credit will count in your favor. Failure to do extra credit will never be counted against you. You should do extra credit work if you find it interesting and think that it might teach you something. It never pays to skimp on the regular assignments in order to do extra credit problems. If you get a 30 on a lab assignment and also 5 points of extra credit, that is *not* the same as getting a 35 with no extra credit. The latter is far better. How to get help ===================================================================== There are many ways for you to get help! Your first step should be to ask a question on Slack. Each of the TAs and section leaders will hold three hours of office hours per week. I also hold office hours each week. The office hours will be posted on our Canvas page. You can visit me or course staff during office hours. If for some reason none of the office hours work, you can make an appointment with me or a TA or your section leader. Policies ===================================================================== Honor Principle --------------------------------------------------------------------- On exams, all work must be your own. For your assignments, you may consult freely with the instructor, TAs, and classmates during the phase of designing solutions, but you should then work individually when creating your programs---typing, documenting, and generating output. During the debugging stage you may discuss your problems with others in the class, but you should not copy code to "fix" bugs. To do otherwise is a violation of the Academic Honor Principle. If you work with a classmate on any assignment, you should tell us who you worked with in a comment at the beginning of your program. Please note that you can work with a classmate only during the designing stage. You should attribute the proper source in any code that you submit that you did not write yourself. This includes code that you take from outside references -- for example a book other than the course text. And it even includes code that you take from class examples, a book, or the assignments. (I agree that may be tedious to attribute the source in code that we have given you, but we want you to be in the habit of attributing your sources.) It is a violation of the Academic Honor Principle to falsely represent output as coming from your program if it did not. If you change your program, make sure to generate output from the version of the program that you hand in. Over the years we have developed and refined a number of homework problems, and I plan to reuse some of them for this class. You should not look at any solutions to homeworks assigned in previous terms, including sample solutions, or solutions written by other students. We have had some uncomfortable situations occur in the past. Two students, Alice and Ralph, discuss an assignment and design their code together. That is fine. But then they decide that since their programs would be so similar, they might as well have Alice type in the code, have Ralph make his own copy of the file containing the code, and then have Ralph make his own minor changes. This is a violation of the Academic Honor Principle. Although you may discuss and design with others, the code you hand in must be entirely your own. Here's another situation that occurred. Trixie and Ed start working independently on a program. Trixie finishes and has a working version. Ed has trouble with his. Trixie helps Ed debug. That is fine. But then Trixie realizes that Ed has a section of code that is all wrong and the program she wrote has just the right code for that section. She shows Ed her program. Or worse, she gives Ed an electronic copy of her program so that he can just paste in the correct code. Either action is a violation of the Academic Honor Principle. Here is a good rule of thumb. If you are talking in normal English (or Chinese or German or some other natural language) you are probably OK. If you find yourself talking in Python code, you have crossed the line. So saying, "Your program runs forever because you have the wrong condition in the while loop" is OK. But saying, "Change while x == 0: to while x >= 0:" is not. All assignments are individual assignments and students are not allowed to collaborate to solve the solutions. If you have any question about whether what you're doing is within the Academic Honor Principle, ask me! If it's late and you can't find me, you're better off erring on the side of caution. Most violations of the Academic Honor Principle come down to failure to cite work that is not yours. If you copy any portion of your program from your friend Elvira and represent it as your work, then you either intended to deceive or were careless about citing. Either case is a violation of the Academic Honor Principle. If you copy your entire program from Elvira but include the comment, "This code was copied in its entirety from Elvira," then you cited properly, though you didn't actually do the work. In this latter case, I would not report a violation of the Academic Honor Principle, though your grade on the assignment would be 0. But that would be far preferable to a COS hearing. The same goes for code that you find in some other book or on the Internet. You are in violation of the Academic Honor Principle if you fail to attribute your sources. You don't need to cite just because you're using a construct you saw elsewhere. For example, you need not cite for using `print("something")`, even though it was in the class examples. That would be like citing "printing press" in an essay! Nor do you have to cite just because you use a while-loop, even though you saw a while-loop in a class example. It's when you lift several lines of code from elsewhere that you need to cite. To cite, include in a comment – near the top of your file is fine – stating where you got the code from: ~~~ python # Based on the say_introduction function in chapter 1 of the course notes. ~~~ I have brought several Academic Honor Principle cases to the COS, and I deeply dislike having to do so. Please don't make me. (###) **Special note for when you work on a computer that anyone else might use** If you are working on a computer that someone else in the course might use, you should be very careful to remove your code from the computer when you are all done. You should probably email your code to yourself before you remove the code. If you leave your code on a computer, and someone else can see it, then they can copy it and hand it in. It's often difficult to tell who was the copy-ee and who was the copy-er. Avoid this situation. To remove your code, you'll want to delete it from the PyCharm workspace. And you'll also want to move any other copies on the computer to the Trash (or the Recycling Bin) and empty it. Student Accessibility and Accommodations ---------------------------------------- Students requesting disability-related accommodations and services for this course should schedule a phone/Zoom meeting with me within the first week of the term. This conversation will help to establish what supports are built into my course. The remainder is standard text provided by Dartmouth [[here](https://dcal.dartmouth.edu/resources/course-design-preparation/syllabus-guide)]. > > In order for accommodations to be authorized, students are required to consult with Student Accessibility Services (SAS; [Getting Started with SAS webpage](https://students.dartmouth.edu/student-accessibility/students/working-sas/getting-started); student.accessibility.services@dartmouth.edu; 603-646-9900) and to request an accommodation email be sent to me. We will then work together with SAS if accommodations need to be modified based on the learning environment. If students have questions about whether they are eligible for accommodations, they should contact the SAS office. All inquiries and discussions will remain confidential. Mental Health and Awareness ------------------------------ The following is standard text provided by Dartmouth [[here](https://dcal.dartmouth.edu/resources/course-design-preparation/syllabus-guide)]. > > The academic environment at Dartmouth is challenging, our terms are intensive, and classes are not the only demanding part of your life. There are a number of resources available to you on campus to support your wellness, including your [undergraduate dean](https://students.dartmouth.edu/undergraduate-deans/), [Counseling and Human Development](https://students.dartmouth.edu/health-service/counseling/about), and the [Student Wellness Center](https://students.dartmouth.edu/wellness-center/). I encourage you to use these resources to take care of yourself throughout the term, and to come speak to me if you experience any difficulties. > ## Respect, Diversity, and Inclusion I would like to create a learning environment for my students that supports a diversity of thoughts, perspectives and experiences, and honors your identities (including race, gender, class, sexuality, religion, ability, etc.). To help accomplish this: If you have a name and/or set of pronouns that differ from those that appear in your official college records, please include them in your zoom display name, or let me know privately. If at any time you feel uncomfortable about the interactions in our (virtual) classroom I encourage you to contact me privately so I can better understand how I can manage the course; indeed, I am eager for feedback about how I can maximize everyone’s experience. If you feel like your performance in the class is being impacted by your experiences outside of class, likewise, please don’t hesitate to contact me. I want to be a resource for you. If you prefer to speak with someone outside of the course, the contacts in the Mental Health and Wellness section above can be an excellent resource. I (like many people) am constantly learning about diverse perspectives and identities. If something was said in class (by anyone) that made you feel uncomfortable, please talk to me about it. As a participant in course discussions, you should also strive to honor and respect the diversity of your classmates. ## Title IX The following is standard text provided by Dartmouth [[here](https://dcal.dartmouth.edu/resources/course-design-preparation/syllabus-guide)]. > At Dartmouth, we value integrity, responsibility, and respect for the rights and interests of others, all central to our Principles of Community. We are dedicated to establishing and maintaining a safe and inclusive campus where all have equal access to the educational and employment opportunities Dartmouth offers. We strive to promote an environment of sexual respect, safety, and well-being. In its policies and standards, Dartmouth demonstrates unequivocally that sexual assault, gender-based harassment, domestic violence, dating violence, and stalking are not tolerated in our community. > > The [Sexual Respect Website](https://sexual-respect.dartmouth.edu) at Dartmouth provides a wealth of information on your rights with regard to sexual respect and resources that are available to all in our community. > > Please note that, as a faculty member, I am obligated to share disclosures regarding conduct under Title IX with Dartmouth's Title IX Coordinator. Confidential resources are also available, and include licensed medical or counseling professionals (e.g., a licensed psychologist), staff members of organizations recognized as rape crisis centers under state law (such as WISE), and ordained clergy (see https://dartgo.org/titleix_resources). > > Should you have any questions, please feel free to contact Dartmouth's Title IX Coordinator or the Deputy Title IX Coordinator for the Guarini School. Their contact information can be found on the [sexual respect website](https://sexual-respect.dartmouth.edu). Health addendum --------------------------------------------------------------------- While the COVID-19 pandemic has already drastically disrupted this course, it has the potential to result in further personal impact which may prevent you from continuing engagement in the class. This may be due to contraction of the disease by you or a loved one, increased familial responsibilities, financial difficulties, or impacts on your mental/emotional health. I have structured the course so that, hopefully, these disruptions will not prevent you from successfully learning the material. In the event that you are directly or indirectly impacted by COVID-19 in such a way that will affect your performance in the course, it is imperative that you reach out to the instructor(s) as soon as possible. You may also reach out to your undergraduate Dean if that would make you more comfortable. We cannot assist you if we don’t know there is a problem. Our first priority is your health and security. We will work to put you in touch with appropriate resources to assist you. Consent to recording --------------------------------------------------------------------- I’ll be recording all of our lectures that occur at the scheduled time, so that those who cannot be there due to poor internet connectivity or time zones can watch later. Dartmouth has asked that I include the following language describing some bounds on how recording should be used. You do not need to send me any sort of agreement on this – it just makes clear that you shouldn’t record or distribute any recordings without my consent. The remainder is standard text provided by Dartmouth [[here](https://dcal.dartmouth.edu/resources/course-design-preparation/syllabus-guide)]. 1. Consent to recording of course meetings and office hours that are open to multiple students. By enrolling in this course, a) I affirm my understanding that the instructor may record meetings of this course and any associated meetings open to multiple students and the instructor, including but not limited to scheduled and ad hoc office hours and other consultations, within any digital platform, including those used to offer remote instruction for this course. b) I further affirm that the instructor owns the copyright to their instructional materials, of which these recordings constitute a part, and my distribution of any of these recordings in whole or in part to any person or entity other than other members of the class without prior written consent of the instructor may be subject to discipline by Dartmouth up to and including separation from Dartmouth. 2. Requirement of consent to one-on-one recordings By enrolling in this course, I hereby affirm that I will not make a recording in any medium of any *one-on-one meeting with the instructor or another member of the class or group of members of the class* without obtaining the prior written consent of all those participating, and I understand that if I violate this prohibition, I will be subject to discipline by Dartmouth up to and including separation from Dartmouth, as well as any other civil or criminal penalties under applicable law. I understand that an exception to this consent applies to accommodations approved by SAS for a student's disability, and that one or more students in a class may record class lectures, discussions, lab sessions, and review sessions and take pictures of essential information, and/or be provided class notes for personal study use only. If you have questions, please contact the Office of the Dean of the Faculty of Arts and Sciences. Important advice --------------------------------------------------------------------- Read the material I ask you to read. Start all assignments early. With few exceptions, at the time you receive an assignment, you'll know everything you need to do it. Do not be afraid to get help. The purpose of this course is not to waste your time. If you are not making progress on a problem, please see me, a TA, or a section leader. Three final pieces of advice: 1. Don't fall behind in this course. 1. *Don't fall behind in this course.* 1. **DON'T FALL BEHIND IN THIS COURSE.** The material in CS 1 builds on itself, and the pace is fast. As a result, it's easy to fall behind in this course, and if you do it's very difficult to recover. Acknowledgements ===================================================================== This version of the course is based on the course designed by Prof. Balkcom, Prof. Cormen, Prof.Farid, Prof. Jayanti, and Prof. Lakshmi Kommineni. I am thankful to them for the wonderful material they have developed.