Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: Description: logohome
CS-1004 — Introduction to Programming for Non-majors

C-Term 2015

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 language 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 come across.

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 with Disabilities
Academic Honesty
Late Assignment Policy

Lecture Notes (password protected)
Homework Assignments (password protected)
Laboratory Assignments (password protected link to be provided)

Lectures for this course will be captured by the WPI Lecture Capture system. You may playback old lectures by visiting the following web address:–

https://echo360.wpi.edu/ess/portal/section/8d1e72c7-90f3-41b4-b1a2-0f5b5ef43ab8

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 Friday, starting on January 23. 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

This course will be conducted in the programming language Python, specifically version 3.4 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.4. Python 3.4 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.4 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.

Here is a list of Python skills that we will work on during the term:– htm

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. 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/c15/Resources/Matplotlib.pdf

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)

·         Interact with hardware devices using a simple serial connection

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.

top

Textbook

The textbook for this term is

Python Programming: An Introduction to Computer Science, 2nd edition, by John Zelle, published by Franklin, Beadle, and Associates, 2010.

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, Noon — 12:50 PM, Lower Fuller Auditorium, January 15 — March 6, 2015. There will be no classes on Martin Luther King day, January 19, and on Academic Advising day, February 19. (On March 6, WPI will follow a Monday schedule.)

[Overflow Classroom: Fuller 320, with live streaming.

This course is oversubscribed by about 12 students. Seats in Lower Fuller Auditorium are on a first-come, first-served basis (regardless of registration status or any other claims to priority). Once the auditorium is full, latecomers will be sent to the overflow classroom.]

Laboratory Sessions: All laboratory sessions will be held on Wednesdays, January 21 — March 4, 2015. Specific sessions are scheduled as follows:–

·         Section C01:– Salisbury 123, 8:00–8:50 AM

·         Section C02:– Salisbury 123, 11:00–11:50 AM

·         Section C03:– Salisbury 123, 3:00–3:50 PM

·         Section C04:– Salisbury 123, 4:00–4:50 AM

Students needing to switch laboratory sessions should discuss with the Professor. As of the start of the course, all sessions are full to overflowing. Students who miss scheduled sessions will only be accommodated in later sessions if there is space.

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

Teaching Assistant:
Jian Xu <jxu3>
Office hours: Fuller A22 or Zoo Lab

Student Assistants:
Nathan Hughes <nhhughes>
Andy Iovanna <awiovanna>
Andrew Paon <ajpaon>
William Temple <wmtemple>
Office hours: Fuller A22 or Zoo Lab

Class e-mail lists: The following two lists are in the domain cs.wpi.edu:–
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/c15
In order to comply with copyright regulations, some of the web pages require you to log in. The links will take you to myWPI, 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

Lab Section C01

9:00

 

 

 

 

 

10:00

 

 HCL

HCL

11:00

HCL

 

Lab Section C02

 HCL

 

Noon

Class

Class

 

Class

Class

1:00

WMT

HCL

 MASH
(ARC)

 MASH
(ARC)

2:00

JX

AJP

3:00

 

HCL 

Lab Section C03

 

4:00

NHH

Lab Section C04

JX

5:00

 MASH
(EPC)

AWI

6:00

7:00

 

 

 

 

 

HCL:–  Hugh C. Lauer
JX:–     Jian Xu
NHH:– Nathan Hughes
AWI:–  Andy Iovanna
AJP:–    Andrew Paon
WMT:– William Temple

top

Grading Policy

Final grades will be computed as follows:

·         Quizzes: 40-45%

·         Homework assignments: 40-45%

·         Class and laboratory participation and subjective assessment: 10-20%

Satisfactory completion of programming homework is required for passing this course. Good grades on quizzes alone are not a 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.

top

Quizzes

In lieu of major exams, there will be a quiz each week at the start of class every Friday, beginning January 23 and continuing thru March 6.

Quizzes will be approximately twenty minutes in length (except the last quiz) and will be open book and open notes. 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.

You may not use computers, calculators, mobile phones, music players, or any other electronic devices during the quizzes. However, if your copy of your textbook is on an iPad, Kindle, laptop, etc., you may refer to it on that device. However, you may not do any computing or access any network during the quiz.

Quiz dates are

January 23
January 30
February 6
February 13
February 20
February 27
March 6 (approximately 30–40 minutes)

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 arrange with the Professor prior to the absence.

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

Students with Disabilities

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

If you have approved accommodations, please go to the Exam Proctoring Center (EPC) in Morgan Hall to pick up Letters of Accommodation.

If you have not already done so, students with disabilities who need to utilize accommodations in 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 or 137). 

The Professor must receive requests for accommodations at least one week prior to a quiz.

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 copy each other’s work.

You may take inspiration from the Web and other external sources, but
you may NOT copy directly from any of them.

Once you and your classmates have worked out a solution to a problem, 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.

Most assignments will be team assignments. For these, it is expected that both team members participate with roughly equal levels of effort. 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.

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

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

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 Turnin system.

There are no grace days for this course.

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 the form of the templates provided with the assignment. Failure to conform to this rule will result in a zero for that assignment.