Comp 116 Spring 2016

Introduction to Scientific Programming

Scientists use computers to analyze, collect, and visualize data. In our class you'll learn to do all three using free tools that are widely used in the sciences.

We will use Poll Everywhere for responses in class.

Today's notebook



Getting Started

  1. Sign up for Poll Everywhere. We will use it for interaction in class.

  2. Join our class on Piazza. We will use it for questions and help outside of class.

  3. Install the free Anaconda Python software package we will use for participation in class, homework, and exams. You'll need a laptop running a recent version of Windows, OS X, or Linux. Installation is simple. Download the installer, double click the resulting file, and follow the on-screen instructions. You can find the installers for the versions we have tested here:

Warning Install these versions above rather than what you may find as the latest on the Anaconda website. They will likely update the packages in a few days and some of our custom software may have problems with things that have changed.

After you get Anaconda installed, start it up and open a new notebook. Then run this bootstrap code.

import urllib.request, zipfile, io
fp = urllib.request.urlopen("")
zf = zipfile.ZipFile(io.BytesIO(

If you have problems ask questions on Piazza.


We are here to help you succeed! Here are some resources that are available to you.


The best way to get answers fast is to look on Piazza and if you don't find the answer, ask your question there. The learning assistants and I will be monitoring Piazza for questions and will answer as quickly as possible. You and your classmates can also answer questions. I will consider Good Answers and Good Questions when deciding on grades.

Learning Assistants

Normally in Sitterson 006 unless a different location is shown on the calendar below.

  • Turker Bulut
  • Megan Dupriest
  • Alexandra Harrison
  • Mark Hensel
  • Daniel Holmgren
  • Shoucheng Huang
  • Bryan Iddings,
  • Oluchi Mbonu
  • Christine Ni
  • Ria Pan
  • Madi Pfaff

Office hours

Gary Bishop (SN255)
10-noon Monday and Friday, others by appointment.

Click the button below to display the office hours for our learning assistants.

Outside office hours

You can arrange to meet with me outside of office hours by sending email. I keep my calendar online linked off my home page. Check it and pick an open looking time between 9AM and 4:30PM week days. Propose that time to me via email and I'll confirm if I can meet you then.

Study Groups

You are encouraged to help one another and study groups are a great way to meet friends and to learn; I commend them to you highly. Find some folks in the class who would like to work together and do it. You are, of course, responsible for your own work.

Free Resources

Guide to Jupyter Notebook

Because Python is insanely popular there are tons of FREE resources on the web to help you learn it. In fact, you don't even need my help! But, I'm going to be teaching the class anyway, so you might as well come along for the ride.

Simply Google Python tutorial, getting started with Python, and numpy tutorial to find many useful resources.


Bulletin description

COMP 116 Introduction to Scientific Programming (3). Prerequisite, MATH 231. An introduction to programming for computationally oriented scientists. Fundamental programming skills, using MATLAB or Python. Problem analysis, algorithm design, plotting and visualizing data, with examples drawn from simple numerical and discrete problems. Students can receive credit for only one of COMP 110, 116, or 121.

General Course Info

Term: Spring 2016
Department: COMP
Course Number: 116
Section Number: 001
Time: MWF 9:05-9:55
Location: Hanes Art Center 121

Instructor Info

Name: Gary Bishop
Office: Sitterson Hall 255
Phone: 919-590-6186
Office hours: See the help section.

Teaching Assistants

See the help section.

Textbook and Resources

No textbook but a world of free information avaliable on the web.

The software will be a free download but will require nearly ½ gigabyte of free disk space on your CCI compatible (Windows, Mac, or Linux) computer.

We will use Piazza for questions and announcements. You will need to sign up and check it regularly.

We will use Poll Everywhere in class. Bring a compatible device to play along. I recommend bringing your computer. The best way to learn is to do. I will give you many opportunities in class to repeat after me and try variations.

Homework and exams will be downloaded and submitted on the class website.

Course Description

In this course you will learn to basics of programming using problems from the sciences as motivation. You will learn to use computers to collect, analyze, and visualize data.

Target Audience

This course is intended to meet the computing needs of students majoring in the sciences and to introduce computer programming to students who have no experience.


MATH 231. We assume familiarity with univariate differential and integral calculus, and the ability to manually solve a system of simultaneous linear equations.

Goals and Key Learning Objectives

To teach problem analysis, algorithm design, and the elements of programming, with emphasis upon mastery of concepts, using a limited number of well-chosen language features and physically motivated driving problems. Although Python is used for instruction, the emphasis is on learning to program rather than learning a specific language.

Course Requirements

About every other week there will be an assignment to write a program and submit it for grading. You will need a CCI compatible (Windows, Mac, or Linux) computer.

Key Dates

Midterm 1: 17 February
Midterm 2: 30 March
Final exam: 5 May 8:00-11:00

Grading Criteria

25% Assignments
10% Midterm 1
20% Midterm 2
40% Final Exam
 5% Participation

All exams are cumulative.

Assignments will be graded automatically by tests that are included in the notebook. You'll be able to instantly determine if you have the correct answer. No partial credit will be given. Late assignment submissions will be accepted with a penalty of 2% of the maximum score per hour or part of an hour after they are due. Assignments may only be submitted via the class website.

Exams will be graded automatically but I will manually assign partial credit.

Participation will be measured by your responses to in-class polls, questions and answers on Piazza, and attendance as evidenced by these.

Points for assignments and exams will first be normalized to 100% and then weighted as described above. The resulting numerical score will be converted to a letter grade using the following ranges.

95  ≤ A  ≤ 100  
90  ≤ A- < 95  
86⅔ ≤ B+ < 90  
83⅓ ≤ B  < 86⅔  
80  ≤ B- < 83⅓  
76⅔ ≤ C+ < 80  
73⅓ ≤ C  < 76⅔  
70  ≤ C- < 73⅓  
65  ≤ D+ < 70  
60  ≤ D  < 65  
      F  < 60

Course Policies and Honor Code

All exams will require you to bring your computer to class. You may use your book, notes, and anything stored on your computer disk (including Python) but no internet resources besides using the class website to download and submit your exam.

I will do all grading. The learning assistants sole function is helping you learn. If you have issues with grades bring them to me.

Collaboration on assignments is encouraged. However, what you hand in must be your own work. Good scholarship requires that all collaboration must be acknowledged. Thus, if you collaborate on the solution of a problem set, we expect you to list your collaborators in the space provided at the top of the assignment. Turning in someone else's code as your own is an Honor Code violation. Failing to acknowledge a collaborator is an Honor Code violation.

Collaboration on exams is a violation of the Honor Code. This includes discussion of questions on a quiz, midterm, or final with students who have not yet taken that evaluation. No outside help of any kind is allowed on exams.

Honor code violations will be prosecuted.


The professor reserves to right to make changes to the syllabus, including dates. These changes will be announced as early as possible.