CS-1004 — Introduction to Programming for Non-majors
C-Term 2019

(Catalog Description)

The traditional foundation of a solid education was captured by the phrase “Reading, Writing and Arithmetic.” Clearly, reading and writing will never go out of style. However, because of the power computers and handheld devices, arithmetic today bears scant resemblance to the arithmetic skills that your grandparents had to learn.

In its place is a new skill that transcends all disciplines — namely, the ability to program a computer to perform tasks on your behalf. Whether you are a scientist, a journalist, an historian, a writer or an engineer, programming enables you to multiply your abilities to save time, eliminate tedious tasks, solve problems that you could not otherwise solve, and outperform your peers who are not able to program.

Many do not realize the importance of programming in their disciplines; a goal of this course is to help you appreciate that importance and to take advantage of that skill.

Programming is not rocket science. Anyone can be taught to program. Do you think only runners in perfect condition can complete a marathon? You must know quite ordinary people who have run a marathon. To do so, you only need the desire and a plan to train your body to complete the task.

This is a course about programming, not computer science. To make an analogy, think of the usefulness of a spreadsheet program like Excel. You can use Excel to track purchases for a student club, to maintain your library of books, to produce reports of your MP3 files, to create charts for your science classes and labs. You can use Excel in so many ways; it is the same with programming.

In this class, you will learn how to program using Python, a modern programming language that is popular in many scientific and engineering disciplines. Along the way you will learn key concepts that will help you to become more effective in MATLAB, C, Javascript or other languages that you might encounter.

If you are thinking about majoring in Computer Science — or one of the related computationally intensive majors such as Robotics or IMGD Tech — then this course is not for you. Please register for CS-1101 or CS-1102.

 

If you already know how to program in some programming language — for example, C, Java, Javascript, etc. — then this course may be too easy for you. Please consider relinquishing your seat to a student who has no programming background at all.

Index

Prerequisites
Overview
Python
Goals and Outcomes
Textbook
Logistics and Administrative Information

Office Hours and M.A.S.H.
Grading Policy
Quizzes
Students needing Academic Accommodations
Academic Honesty
Late Assignment Policy

Lecture Notes (password protected)
Homework (i.e., Programming) Assignments (password protected)
Laboratory Assignments (password protected)

Lectures for this course will be captured by the Echo 360 Lecture Capture system. You can find this on Canvas, listed near the bottom on the left side of the course home page.

Link to be provided

The Lecture Capture system records the voice of the lecturer, all material projected on the screen from the podium, and a live video of the front of the classroom.


Prerequisites

The only prerequisites for this course are

(a)    an earnest desire to learn to program, and

(b)   a willingness to work hard at it.

For normal students, this means about 1½ – 2 hours of effort per day, seven days per week, in addition to attending classroom and laboratory sessions.

Learning a programming language is (somewhat) like learning to speak a foreign language. One must speak a foreign language at least a little bit each day. Without that, there is no hope of being able to communicate at even the most basic level.

Likewise, one must use a programming language at least a little bit each day in order to achieve a modicum of proficiency in it.

Previous experience has shown that it does not work for students to concentrate all their work just before assignments are due and/or just before quizzes.

top


Overview

CS-1004 has three main components:–

·         Classroom activities, during which we introduce new concepts and discuss their use in computer programs.

·         Homework, during which students write programs that are increasingly more challenging and useful.

·         Laboratory sessions, during which students can work thru class material and programming problems in an interactive setting with instructors and teaching assistants.

This course will have seven quizzes during the term, one each week on Tuesday, from on January 15 thru February 25, 2019. The final quiz will be held Friday, February 6, 2019. Collectively, quizzes will represent approximately 40% of the grade for the course. In addition, homework submissions will represent about 40% of the grade, and class and laboratory participation will represent about 20% of the grade.

top

Python

This course will be conducted in the programming language Python, specifically version 3.6.5 of Python.

Why Python?

·         Python contains all the programming constructs and concepts that you would find in languages such as C, C++, Java, MATLAB, Maple, Javascript and countless other languages. Once you have learned these fundamental concepts, you will be able to quickly grasp whatever programming language comes your way.

·         Python offers an easier “learning curve” than other languages, while being just as powerful.

·         The scientific community has quickly embraced the use of Python. This language is not intended solely for Computer Science. Its syntax and style are simpler when compared with many other programming languages.

Note:  Two different versions of Python in use at WPI and worldwide, name Python 2.7 and Python 3.6-3.7. Note that Python 3.x is not compatible with Python 2.7 (for any value of x). Programs borrowed from other sources using Python 2.7 will not work correctly this term.

You should plan to install Python 3.6.5 and additional packages needed for this course onto your personal computer or laptop. Instructions for installing Python on your Windows 7 or Windows 8 system can be found here:– docx, pdf. Instructions for setting up Python on your Macintosh system can be found here:– docx, pdf. If you have a Linux system, please consult one of the Professors.

top

Goals and Outcomes

Upon completion of this course, students should be able to: –

·         Understand how to write programs to solve problems

·         Use a debugger to single-step through a program execution

·         Write Python programs using appropriate programming constructs

·         Process data from keyboard input or files (binary and CSV)

We have identified a set of skills that you will learn and exercise in this class. These skills summarize the experience that one would have using any language. Once you have mastered these fundamental skills, you can apply your programming knowledge to learn new languages. Over time, as you become more proficient, you will make your own skill sets that will prove useful in your career.

The following URL contains a list of Python skills that we will work on during the term:– CS1004 Programming Skills

top

Professors

This term, the course will be jointly taught by Professors Hugh C. Lauer and Jonathan Weinstock. The professors will divide the lecture topics between them. You may attend the office hours of either professor for all matters pertaining to the course.

Textbook

The textbook for this term is

Python Programming: An Introduction to Computer Science, 3rd edition, by John Zelle, published by Franklin, Beadle, and Associates, 2017.

This book is extremely inexpensive — it is in your interest to own a copy.

If you have access to the second edition (published in 2010), you may use it. However, you will be responsible for any differences between the second and third editions, including homework and programming assignments.

top

Logistics and Administrative Information

CS-1004 meets for four one-hour class sessions per week for a seven-week undergraduate term (28 hours).

Time and Place: Mondays, Tuesdays, Thursdays, and Fridays, noon — 12:50 PM, Salisbury Labs 115, January 9 — March 1, 2019. No classes are scheduled for January 21 (Martin Luther King Day), February 21 (Academic Advising Day) and February 22 (makeup day for classes missed due to snow or other reasons).

            On Wednesday, January 9, 2018, WPI will follow a Monday schedule. That means that we start the term on a Wednesday but meet at our regular time of 12:00 noon in our regular classroom (SL-115).

Laboratory Sessions: Laboratory sessions CX01–CX04 will be held on Wednesdays, January 16 — February 27, 2019 as follows:–

·         Section CX01:– Salisbury Labs 123, 8:00–8:50 AM

·         Section CX02:– Salisbury Labs 123, 11:00 AM – 11:50 AM

·         Section CX03:– Salisbury Labs 123, 3:00–3:50 PM

·         Section CX04:– Salisbury Labs 123, 4:00–4:50 PM

Laboratory sessions for section CX05 and CS06 will be held Tuesdays as follows: –

·         Section CX05:– Salisbury Labs 123, Tuesdays 1:00–1:50 PM

·         Section CX06:– Salisbury Labs 123, Tuesdays 11:00 AM – 11:50 AM

Students needing to switch laboratory sessions should discuss their situations with the Professors and/or the TAs. There is no need to change registrations to switch lab sessions. Most lab sessions are full, so students who miss scheduled sessions can only be accommodated in later sessions if there is space.

Professor: Hugh C. Lauer
Email: <lauer>@wpi.edu
Office hours: see chart below; or by appointment
Office: Fuller Labs, Room 144

Professor: Jonathan Weinstock
Email: <jweinstock>@wpi.edu
Office hours: see chart below; or by appointment
Office: Anderson Lab (on Jan 10, Jan 28, Feb 7) Shuster Lab (other dates)

Graduate Teaching Assistant:
Meghana Kasal – mkasalvinayakuma at wpi.edu
Guanyi Mou – gmou at wpi.edu
Office hours: Fuller A22 or Zoo Lab

Student Assistants:
Andrew Nolan – acnolan at wpi.edu
Jason Abel – jabel at wpi.edu
Alexander Wurts – ajwurts at wpi.edu
Hong Hung – hphong at wpi.edu
Office hours are held at: Fuller A22 or Zoo Lab

M.A.S.H.: – (Math and Science Help)
MASH leader – Saahil Claypool

M.A.S.H. Sessions: – The Math and Science Help sessions will be held as follows: –
Mondays:         3:00 PM in the Academic Resources Center (Daniels Hall)
Tuesdays:         2:00 PM in the Academic Resources Center (Daniels Hall)
Wednesdays:    7:00 PM in the Exam Proctoring Center (Daniels Hall)
Thursdays:       7:00 PM in the Exam Proctoring Center (Daniels Hall)

Class e-mail lists: Class e-mail lists will be managed primarily thru Canvas.
The following e-mail list is backup to the Canvas lists: –
             gr-cs1004-staff at wpi.edu — to reach just the TAs, SAs, and the two professors

            You may also send messages to the Professor, TA, and SAs thru Canvas.

Course web site: http://web.cs.wpi.edu/~cs1004/c19.
To comply with copyright regulations, some of the web pages require you to log in. These will be hosted on Canvas, where you can log in with your WPI username and password.

Absences: Students needing to be absent from class should notify the professor by e-mail or in person as soon as possible. Likewise, students needing to schedule assignments or presentations around religious holidays, projects, or interview trips should notify the professor at the beginning of the course.

top

Office Hours and M.A.S.H

If none of these times work for you, please schedule a separate appointment.

Sunday

Monday

Tuesday

Wednesday

Thursday

Friday

Saturday

 

8:00

 

 

Lab Section CX01

(GM, MK)

(Salisbury 123)

 

9:00

 

HCL

MK

MK

 

10:00

HCL

 

MK

HCL

HCL 

 

11:00

 

Lab Section CX06

(GM, MK)

 (Salisbury 123)

Lab Section CX02

(AN, JA)

 (Salisbury 123)

HCL

MK

 

Noon

Class

Class

JA

Class

Class

1:00

HCL, JW

Lab Section CX05

(AN, JA)

 (Salisbury 123)

HCL, JW

JW

2:00

 AN, JW

MASH
ARC)

JA, JW

 AN, JW

3:00

JW,
till 3:30

MASH
(ARC)

Lab Section CX03

(AW, HH)

 (Salisbury 123)

JW,
till 3:30

HH

4:00

AN, HH

Lab Section CX04

(AW, HH)

 (Salisbury 123)

AN, HH

5:00

HH

HH

AW

AW 

6:00

 

7:00

 

 

 

MASH
(EPC)

MASH
(EPC)

 

 

 

HCL: – Hugh C. Lauer
JW: –   Jonathan Weinstock
AN: –   Andrew Nolan
AW: –  Alexander Wurts
GM: – Guanyi Mou
HH: –  Hong Hung
JA: –     Jason Abel
MK: –  Meghana Kasal
MASH leader: – Saahil Claypool

Teaching Assistants’ office hours are held in Fuller A22 or the Zoo Lab next door. (These rooms are on the lowest level of Fuller, as far from the elevator as is possible to go.)

Prof. Lauer’s office hours are in Fuller 144.

Prof. Weinstock’s office hours are in the Anderson Lab in the Library (Jan 10, Jan 28, Feb 7) or Shuster Lab in Library (other dates).

top

Grading Policy

Final grades will be computed as follows:

·         Quizzes: approx. 40%

·         Homework assignments: approx. 40%

·         Class and laboratory participation and subjective assessment: approx. 20%

A grade of A generally means “exceeds expectations”; a grade of B generally means “meets expectations”; a grade of C generally means “does not meet expectations.”

There are plenty of extra credit opportunities during the course. Students who earn grades of A usually take advantage of many of these opportunities.

Previous experience suggests that approximately one-third of the class will earn grades of A, approximately one-third will earn grades of B, and approximately one-third will earn grades of C.

Satisfactory completion of programming homework is required for passing this course. Good grades on quizzes alone are no substitute for doing the projects and for attending laboratory sessions.

It is in your interest that the Professors and the TAs/SAs know and recognize you by name.

If there are any circumstances that limit or restrict your participation in the class or the completion of assignments, please contact one of the professors as soon as possible to work something out.

top

Quizzes

In lieu of major exams, the course includes six weekly quizzes at the start of class every Tuesday, beginning January 15 and continuing thru February 19. In addition, a final quiz will be held on Friday, March 1. Quiz dates are

January 15
January 22
January 29
February 5
February 12
February 19
March 1

Quizzes are open book and open notes and are typically twenty minutes in length (except the last quiz, which is forty minutes). You may start the quiz as soon as you arrive in the classroom. Quizzes will end at a designated time; therefore, it is in your interest to arrive early and get a little extra time.

If you finish early, please remain quietly in your seat to avoid disturbing your neighbors.

Quizzes are open-book, open-notes. You may refer to textbooks and notes on a reading device, tablet, or laptop. If a calculator is needed, you will be given advanced notice; in this case, you may use a calculator or a calculator app on your phone, tablet, or laptop. However, you may not do any computing or access any network during any quiz.

There are no makeup quizzes. The quiz portion of the grade will be based on your best five of the seven quizzes. This policy is intended to accommodate illnesses, absences from campus for any reason, or just plain bad days. If you must be absent from campus on a quiz day, please notify one of the Professors prior to the absence.

The last (i.e., “final”) quiz is mandatory for passing this course. Skipping the final quiz is tantamount to requesting a grade of NR for the course.

Quiz grading

The first six quizzes are worth 20 points each, and the final quiz is worth 40 points.

The quiz portion of the course grade is based on the best five of the seven quizzes. To calculate the “best five,” we sum the five highest numerical quiz grades. We then take this as a fraction of 120 points, which is the maximum possible score from four weekly quizzes plus the final. This fraction represents the quiz portion of the course grade. See here for an additional explanation.

top

Submitting Homework Assignments        

All homework assignments must be submitted via the Canvas system. You will need to log in with your WPI username and password.

Canvas normally requires some getting used to. It is strongly suggested that you submit a “practice” or “dummy” file to Canvas prior to the due date of the first homework assignment, just to prove to yourselves that you can do it. Please make sure that the file is clearly labeled as a dummy so that we do not inadvertently count it toward your grade.

Students Needing Academic Accommodations

If you need course adaptations or accommodations because of a disability, or if you have medical information to share with the Professors that may impact your performance or participation in this course, please make an appointment with one of them as soon as possible.

If you have approved accommodations, please request your accommodation letters online through the Office of Disability Services student portal.

If you have not already done so, students with disabilities who need to make use of accommodations for this class are encouraged to contact the Office of Disability Services (ODS) as soon as possible to ensure that such accommodations are implemented in a timely fashion. This office can be contacted via email: DisabilityServices@wpi.edu, via phone: (508) 831-4908, or in person: Daniels Hall First Floor 124. 

Quiz and Test Accommodations for CS-1004 are as follows: – The Professors send an electronic copy of each quiz to the Exam Proctoring Center (EPC) the evening before the Quiz. Students taking a quiz at the EPC should take it at the same time as students in the classroom. Students return to class as soon as they are finished and should bring their completed quizzes with them in sealed, signed envelopes, so that they may be graded in a timely fashion.

Under no circumstances may a student start a quiz at the EPC later then the finish of the quiz in the classroom. The reason for this restriction is that answers are distributed as soon as the quizzes are collected in the classroom. Likewise, students must stay in the EPC at least until the start of the quiz in the classroom; this is to avoid the possibility of communication between students in the EPC and students in the classroom.

top

Team Assignments

Some (but not all) homework assignments are two-person team assignments. For these, it is expected that both team members participate with roughly equal levels of effort in each assignment. When you put your name on a team submission of an assignment, you are testifying not only that you have fully participated in that assignment, but also that your teammate has fully participated in that same assignment.

To work as a team, you must “register” by sending an e-mail to gr-cs1004-staff@wpi.edu. One of the professors or TAs will then create a “team” under the names of the team members in the Canvas system. Each team name consists of the user names of both member, in alphabetical order, separated by a hyphen.

When you submit an assignment, Canvas will give you the opportunity of submitting for yourself or for your team. Make the appropriate selection.

Be sure to put the names of both team members on every file of your submission to Canvas. Submit only one copy of the assignment for the entire team. Do not submit duplicate copies under the individual team members’ names.

Please contact one of the professors if you wish to change teams or divorce your teammate.

Academic Honesty

Students are strongly encouraged to work together, help each other, reinforce each other’s knowledge, and consult experts and resources outside the course on all topics. Like most professional environments in your future, success depends upon how well you do when you have access to a full array of resources, not how much you remember by rote.

·         In this course, you may help each other, but you may not look at or copy each other’s work or anyone else’s work.

·       You may take inspiration from the Web and other external sources, but you may not  look at or copy directly from any of them.

·       You may work out something on a whiteboard, napkin, back of envelope, etc., with anyone else. You may discuss your code with anyone outside the course.

·       You may not look at anyone else’s code (except your teammate’s).

·       You may not share your code with anyone else in this course or any future course (except with your teammate)

Once you have worked out a solution to a problem (possibly in consultation with others), you must write it up in your own words or code it in your own coding style. You must type any code into a file yourself. You may not copy from any electronic version and paste to your assignment. Retyping from an existing piece of code — whether electronic, printed, or handwritten — is indistinguishable from copying and will be regarded as an instance of Academic Dishonesty.

For all assignments, the WPI Academic Honesty Policy applies:–

https://www.wpi.edu/about/policies/academic-integrity/student-guide

Violations of the Academic Honesty policy will be handled as specified in this document.

In the case of a violation involving a team assignment,
all members of the team are held to be equally responsible.

top

Late Policy

Late homework will be penalized 5% of the full value of the homework for each hour late up to two hours and 10% per hour after that. Timely submission is based on dates recorded by the Canvas system.

There are no grace days for this course.

Late penalties are not waived because of issues with Canvas. Be sure to check that you are able to submit to Canvas a sufficient amount of time before the assignment is due.

No or makeup programming assignments will be given. If you have special circumstances, contact one of the Professors at least 24 hours before the assignment is due.

All homework assignments should be submitted in accordance with the instructions provided with the assignment. Failure to conform to this rule will result in a zero for that assignment.

Other Stuff

Pyplot

One of the packages that we will use in this course is matplotlib, and specifically a package within matplotlib called pyplot. Pyplot is a useful tool for plotting graphs of all kinds, especially engineering and scientific applications. You don’t need to master this yet. However, if you are interested in reading ahead, a beginners’ guide for pyplot is here: –

http://matplotlib.org/users/pyplot_tutorial.html.

Comprehensive documentation for matplotlib itself is over 2600 pages long and can be found here: –

http://www.cs.wpi.edu/~cs1004/a18/Resources-A18/Matplotlib.pdf