image001
CS-1004 — Introduction to Programming for Non-majors – C-Term 2017

(Catalog Description)

(Web-CAT Link)

(PollEveryWhere)

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 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 learn how to be 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

Submitting Homework Assignments
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 WPI Lecture Capture system. You may playback old lectures by visiting the following web address:–

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 additional to attending classroom and laboratory sessions.

Learning a programming language is (somewhat) like learning to speak a foreign language. One has to speak it 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 of 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 a computer program.

·         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.

There will be seven quizzes during the term, one each week on Thursday, starting on January 19, 2017. Collectively, quizzes will represent approximately 40% of the grade for the course, homework submissions will represent about 40% of the grade, and class and laboratory participation will represent about 20% of the grade.

top

Python

https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcR6e-opjyMyYXXxBg6zJy997L5hW1zK5zy_Jcj_Wm2wL7LHks5I

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

Why Python?

·      Python contains all of the programming constructs that you would find in languages such as C, C++, Java, MATLAB, Maple, Javascript and countless other languages. Once you have learned these fundamental constructs, 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:  There are two versions of Python in use at WPI and worldwide, name Python 2.7 and Python 3.5. Python 3.5 is not compatible with Python 2.7. Programs borrowed from other sources using Python 2.7 will not work correctly this term.

You should plan to install Python 3.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 or Linux system can be found here:– docx, pdf.

If you have trouble download graphics.py from the docx/pdf file, right click the link here (graphics.py) and select "save link as" to download the file to your Python directory under Tools/scripts directory.

top

Goals and Outcomes

Upon completion of this course, the student 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

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, 2016.

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

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, 12:00 PM — 12:50 PM, Salisbury 115,  January 12 — March 3, 2017. There will be no classes on January 16, Martin Luther King day, and February 16, WPI advising day. (On Friday, March 3, WPI will follow a Monday schedule; this will have no impact on our class.)

Laboratory Sessions:  All laboratory  sessions will be held on Tuesdays/Wednesdays, January 17/18, thru March 21/22, 2017. Specific sessions are scheduled as follows:--

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

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

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

·         Section CX04:-- Salisbury Labs 123, 4:00-4:50 AM Wednesday

·        Section CX05:-- Salisbury Labs 123, 1:00-1:50 PM Tuesday

·        Section CX06:-- Salisbury Labs 123, 11:00-11:50 AM Tuesday

Students needing to switch laboratory sessions should discuss their situations with the Professor. There is no need to change registrations in order 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: Hao Loi (HL)
Email: hcloi@wpi.edu
Office hours: see chart below; or by appointment
Office: Fuller Labs, Room 140

Graduate Teaching Assistant:
Rishitha Kiran (rkiran) in the wpi.edu domain
Office hours: Fuller A22 or Zoo Lab

Student Assistants:
Paul Roberts  <pdroberts> in the wpi.edu domain
Matthew Piazza <mwpiazza> in the wpi.edu domain
Andrew Walter <atwalter> in the wpi.edu domain
Bradford Bonanno <bwbonanno> in the wpi.edu domain
Baker, Jackson Craig  <jcbaker>  in the wpi.edu domain
Antonatos, Spyridon <santonatos> in the wpi.edu domain

            
Office hours are held at: Fuller A22 or Zoo Lab

M.A.S.H.:– (Math and Science Help)
MASH leader: Griffin Bishop: <grbishop> in the wpi.edu domain

 

M.A.S.H. Sessions:–
Monday: 8:00– 9:00 PM in the Academic Resources Center (ARC)
Tuesday: 10:00– 11:00 AM in the Academic Resources Center (ARC)
Wednesday: 12:00 – 1:00 PM in the Exam Proctoring Center (EPC)

Class e-mail lists: Class e-mail lists will be managed primarily thru Canvas.
The following two e-mail lists in the cs.wpi.edu domain are backup to the Canvas lists:–
            cs1004-all  — to reach all students, TAs, SAs, and the professor
            cs1004-staff — to reach just the TAs, SAs, and the professor

Course web site: http://web.cs.wpi.edu/~cs1004/c17.
In order 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 userID 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

  Sunday Monday Tuesday Wednesday Thursday Friday Saturday
8:00       CX01      
SL123
Andrew/
Jackson
9:00              
10:00   HL HL   HL HL  
M.AS.H.
11:00   HL HL CX02 HL HL  
CX06 SL123
SL123 Brad/
Brad/ Paul
Paul  
Noon   Class Class M.AS.H.   Class  
Class
 
 
1:00   Matt CX05 Brad   Matt  
SL123
Andrew/
Jackson
2:00   Brad Brad   Brad Brad/Matt  
3:00  Spyridon      CX03 Jackson   Spyridon 
SL123
Spyridon/Mathew
4:00 Spyridon  Jackson   CX04 Jackson Andrew Spyridon 
SL123
Spyridon/Matthew
5:00       Matt Andrew Andrew Spyridon 
6:00   Paul Paul Jackson Andrew    
7:00   Paul Paul Jackson Andrew    
8:00   M.AS.H. Paul        

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.”

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 Professor and 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 the professor as soon as possible in order to work something out.

There are no makeup for missing class participation.  I will drop four days of your lowest scores on class participation. This policy is intended to accommodate illnesses, absences from campus for any reason, or just plain bad days. Your score for each day on class participation is based on number of correct answers over total number of questions.

 

top

Quizzes

In lieu of major exams, there will be a quiz each week at 12:30pm every Thursday, beginning January 19 and continuing thru March 2.  You must come to class to take the quizzes.

Quizzes will be approximately twenty minutes in length (except the last quiz) and will be open book and open notes.  You will take the quizzes on Canvas.  It's highly recommended to bring your own laptop to class on Thursday to take the quizzes.  If you don't have a laptop, you can take a paper quiz instead.  The only condition is that you are not allow to use a laptop while you are taking a paper quiz.  The quizzes will start on 12:30pm and end on 12:50pm.  You will get your scores right after you have completed your quiz on Canvas.  It will take a few more days for paper quizzes to be graded.

Quiz dates are

There are no makeup quizzes. The quiz portion of the grade will be based on your best five of the six 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 arrange with the Professor prior to the absence.  The final quiz can't be drop from your scores.

The last (i.e., “final”) quiz is mandatory for passing this course. It will be slightly longer and worth a few more points than the other quizzes. Skipping the final quiz is tantamount to requesting a grade of NR for the course.


top

Submitting Homework Assignments        

Since this course is about learning to writing computer programs, the homework is focused on actually writing programs of increasing levels of difficulty. Students of average background and ability generally find that programming assignments require 15 or more hours of work per week, particularly during the later weeks of the course.

There will be six programming assignments — generally assigned on a Friday and due the following Friday at 6:00 PM. (Exceptions: the first assignment will be made on the first day of class, and the last assignment will be due after the following weekend.)

All homework assignments must be submitted via the Web-CAT system. You will be provided an username and password to login to Web-CAT.  The Web-CAT is an auto-grading system which allow you to find out your scores immediate after your submissions.  You can submit your homework to the Web-CAT system as many time as you want until you score 100% or before the due date.  The professor will demonstrate how to submit your homework to the Web-CAT system on the first day of class.

This will be the first time for most of teaching assistants who have used Web-CAT.  There may be some logistical difficulties and “teething troubles” at the start of the term. It is strongly suggested that you submit a “practice” or “dummy” file to Web-CAT prior to the due date of the first homework assignment, just to prove to yourselves that you can do it.

 

Web-CAT link:

http://hcloi-vm.cs.wpi.edu:8080/Web-CAT/WebObjects/Web-CAT.woa

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, not only are you testifying that you have fully participated in that assignment, but you are also testifying that your teammate has fully participated in that same assignment.

To work as a team, just add your teammate's name when you submit your homework to Web-CAT system.  You are only allow to have at most two people per team.

Be sure to put the names of all team members on every file that you submit to Web-CAT. Submit only one copy of the assignment for the entire team. Do not submit duplicate copies under the individual team members’ names.

If you decide to break up the team in a later date, just don't enter your teammate's name when you submit your homework to Web-CAT.  You can't add your teammate's name after the due date.  So make sure you include your teammate's id when you submit your homework to Web-CAT.

top

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 Professor that may impact your performance or participation in this course, please make an appointment with him 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 Professor sends an password 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 can leave any time after they have finished the quiz.  If the student wants to take a paper quiz instead, please make prior arrangement with the professor.

 

top

 

Be sure to put the names of all team members on every file that you submit to Web-CAT. Submit only one copy of the assignment for the entire team. Do not submit duplicate copies under the individual team members’ names.

 

top

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 the 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 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 is considered to be an instance of Academic Dishonesty.

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

http://www.wpi.edu/Pubs/Policies/Honesty/policy.html

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 10% of the full value of the homework for each hour after the due date. Timely submission is based on dates and times recorded by the Web-CAT system.

There are no grace days for this course.

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

No extra credit or makeup programming assignments will be given. If you have special circumstances, contact the Professor 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 1300 pages long and can be found here:–

http://www.cs.wpi.edu/~cs1004/a16/Resources/Matplotlib.pdf