CSCI1101-Computer Science 1

Fall, 2018

General Course Information Course Content Required Background Software
Textbooks Required Work Grading Detailed Course Schedule

General Course Information

Howard Straubing
Computer Science Department
St. Mary's S251
Office Hours: MW 2-5

Teaching Assistants:
Henry Chen (Office Hours: Fulton 160, Thursday, 11-12.)
Jason Posner  (Office Hours: Fulton 160, Tuesday 10-12.

The course will meet Tuesday and Thursday at noon in Merkert 130. You are also required to sign up for one of the associated discussion groups on Tuesday afternoon or Wednesday morning. Note that this is Section 1 of CSCI1101.  The corresponding discussion sections Sections 1 and 2 are CSCI1008, meeting Monday at 5 and Tuesday at 4 in Higgins 260.

Course Content

This is an introductory course in computer programming, using the programming language Python. By the end of the course you should be able to design fairly complex programs that do interesting and useful things.
More generally, this is an introductory course in Computer Science. Although almost all of the work you do for the course involves writing programs, the subject is wider than just programming, much less programming in a particular  language. You will learn something about the special approach Computer Science takes to representing and manipulating information, and to solving problems.

Required Background

There is no course prerequisite for CSCI1101. If you have done some programming, so much the better, but none of these is required. It helps to be comfortable with high school-level algebra. You should also know how to use the computer you are working with. That is, you should know how to use folders and files, download things from the Web, and install software.

If you're uncertain as to whether this is the appropriate course for you, please come see me, and I'll be happy to discuss the various options.


Computer Information.  Almost every student arriving on campus these days owns a computer running some version of the Macintosh  or Windows Operating System (or perhaps Linux).  Assignment 0 will contain instructions for installing the necessary software on your computer.  If you do not own a computer, or if your computer is behaving badly, you may do the work for this course at one of the workstations in the Computer Science workstation lab in Fulton 160.


There is no required textbook for this course.  I will recommend a number of outside sources and tutorials, usually free, never very expensive. A good place to start is Think Python, 2nd edition, by Allen B. Downey.  You can download it for free, or buy it on Amazon for less than $30. It's more concise and readable than most textbooks, although I don't like its approach to every topic, so I will present some things differently from the way the book does.

Required Work

The centerpiece of the course will be the weekly programming problem assignments.  Every assignment will involve writing Python programs,  and some assignments  will have a pencil-and-paper component as well. I strongly advise you to start every assignment within a day or two of receiving it, so that you will be able to find out where the troublesome parts are and ask meaningful questions in class, discussion sections, and office hours.  The assignments are not meant to be completed in a single late-night session. This does not mean that assignments will necessarily require many hours to complete, but rather that questions are likely to arise during the work, and you may need some answers before you can proceed further.  Unless specified otherwise, assignments will be due every Thursday at 11PM.   (Since we use electronic submission, we can have the due date be different from a class day.)

Assignments will be posted on this website, along with all class demos, and supplementary notes and handouts.   For this reason (and others) late homework assignments will not be accepted.

You are also expected to attend the weekly discussion sections and complete the in-class exercises given in these sessions.

There is a Canvas site for the course.  This will be used to submit your homework assignments, and I will post quizzes and homework solutions there as well. 

There will  be two in-class midterm exams, and a final exam Tuesday, December 18, at 4PM.

Eyes Front!

My colleague Bob Muller calls this policy the 'laptop-free classroom'. (For 'laptop', read 'laptop and smartphone'.)

A successful class requires your attention, engagement, and participation.  You need to be prepared to ask and answer questions during the lectures, and to attend to the questions and answers of your fellow students and of the instructor.  That screen open to your e-mail or Facebook page distracts not only you, but the students sitting behind you. For this reason, open laptops are not permitted in the classroom, unless they are part of some planned activity for which your computer is required.

You say you're taking notes on that laptop instead of shopping on Amazon? You should be aware that (a) it is very difficult to take notes for this class on a computer, given the large number of special symbols and diagrams that we use; and (b) taking notes by hand is better for you.  It is acceptable to take notes on a tablet computer with a stylus.

Academic Integrity

While I encourage you to discuss homework problems both among yourselves and with me, when it comes to finally sitting down and preparing the completed assignment, you are required to work alone.  Thus it is acceptable to learn from another student the general idea for writing program code to perform a particular task, but unacceptable to  take an extended piece of code written by another person and incorporate it into your submitted assignment as your own work.  Similarly, it is perfectly all right to get ideas from additional reading that you do both in books and on the Web, but you may not import large pieces of code wholesale into your own work. If you have any uncertainty about the application of this policy, please check with me.

It should go without saying that during quizzes and exams there is to be no communication between students, and no use of outside materials except those explicitly authorized in advance.

Failure to comply with these guidelines will be treated as a violation of the University policies on academic integrity. Please make sure that you are familiar with these policies.

Services for Students with Disabilities

If you are a student with a documented disability seeking reasonable accommodations in this course, please contact Kathy Duggan, (617) 552-8093,, at the Connors Family Learning Center regarding learning disabilities and ADHD, or Rory Stein, (617) 552-3470,, in the Disability Services Office regarding all other types of disabilities, including temporary disabilities. Advance notice and appropriate documentation are required for accommodations.


To be eligible for  a passing grade in this course, you must complete at least 60% of the assignments in a satisfactory manner. Your grade will then be computed from your performance on assignments, quizzes and midterms, and final exam.  The assignments will account for about 35% of the grade, discussion section participation 10%, the midterms 30%, and the final exam for about 25%.  (These ratios are subject to minor adjustments, hence all the "abouts".)

Detailed Course Schedule

The calendar of topics given here is only approximate---sometimes it takes more time, or less, to cover a topic than I anticipated.  Now and again I will decide to eliminate or add a topic, or change the order in which I present them.  Thus this section of the website will grow and change as the semester progresses. Note that there is no class September 6, October 9 or November 22.  November 20 is a regular class day.

Handouts and Lecture Notes
Lab Exercises from the Discussion Sections
August 28
Python in interactive mode.

Types, constants, operators, expressions, variables, assignment.
An annotated interactive session with Python

Notes to accompany Assignment 0.

The first two test programs:

Assignment 0.  Due 11:59 PM, August 30.

Install the software, and revise the two sample programs.
August 30-September 4

Writing simple functions and programs.

The wind chill program, first version (DON'T write programs this way.)

The wind chill program, second version.
(Write them this way.)

Notes on structure of Python programs; how function calls work, etc.

Discussion section problem for the week of September 4.

Assignment 1, Due 11:59 PM, September 6.

Templates for the programs in the assignment.
September 6
No class (Mass of the Holy Spirit)

September 11-13
Boolean expressions, conditional statements (if and its relatives)
Notes on boolean expressions.

Example:Solving a quadratic equation

Example: Solving a quadratic equation (again)

Example: A fancy version of the calendar program that checks for valid input and prints nice output.

Example:  A diagnostic decision tree, and an implementation, done two different ways.

Discussion section exercise for the week of September 10.

Accompanying code.
Assignment 2, Due 11:59 PM, September 18

Download a 'compiled' version of the college admission program so you can see what it is supposed to do--see instructions.
September 18-20
Iteration (while statement).

Exception handling.
 Some loop basics (lots of short functions demonstrating while and for statements).

Some nested loops.

Random number generation, and a program that plays the casino game craps.

Discussion section exercises for the week of September 17.

Accompanying code.

Assignment 3, due 11:59 PM, September 25.

Code to accompany Assignment 3.

The file  wordslist1000.txt

September 25-27

Some basic string manipulations

Writing numbers in English
Discussion section exercises for the week of September 24

Assignment 4, due 11:59PM, October 4
October 2-4
Making GUIs, review
Notes on creating GUI applications.
A minimal application with two buttons.
Jack and Jill
Calculate area of a triangle (again)
..and again
Draw a checkerboard
Draw 281,474,976,710,656 different checkerboards.
Discussion section exercises for October 1

Accompanying code
Review exercises (from an old midterm)
Accompanying code

October 11
First test
The midterm with solutions and results.

A GUI problem for extra credit.
October 16-18
Lists, list comprehension.
Notes on lists

Prof. Griffith's slides for lists (from another section)

The calendar program simplified even further.

Tabulating dice statistics.

October 15-16 Discussion section exercise
Assignment 5

The Scrabble tournament word list
October 23-25
Sorting and Searching

A look a recursion

Linear and binary search

Accompanying code

Prof. Griffith's slides on binary search

Code with sorting algorithms and timing tests

October 22-23 Discussion section exercises.

October 30-November 1
Multidimensional arrays. Binary and hex. Image processing.

October 29-30 Discussion section exercises

Accompanying code
Assignment 6, due Tuesday, November 6

.py files you will need for this assignment

main program
imaging support

.ppm files to experiment with (see instructions if you want to use your own .jpg files)


David Bowie

Barack Obama


November 6-8
Tuples and dictionaries. File processing.
An example using dictionaries to count the number of occurrences of words in a long text.

The text used for this experiment.

An efficient solution to the anagrams problem, using dictionaries.
Discussion exercises for November 5-6.

Accompanying code
Assignment 7, due Monday, November 19

The database
Code to get you started

The Oracle of Bacon
November 13
Second midterm
The second midterm from an earlier version of the course.

Solutions to the old midterm.

This year's test

Solutions and results
Discussion section exercises for November 12-13.

Accompanying code.

November 15-27.
(No class November 22.)
Recursion examples.

Fibonacci numbers and other recursion disasters

The queens puzzle (backtracking)

Some tools used to animate the Towers of Hanoi solution (they really don't involve recursion, they simply use the recursive solution to make a cool display):

Beef up Towers of Hanoi to create a list of configurations, not just a list of moves..

A general-purpose animation engine for Tkinter

Towers of Hanoi plugged into the animation engine.

This piece is used to get nice colors.

Animated queens

Discussion section exercises for November 26-27.

Accompanying code.
Assignment 8, due Friday, November 30
November 27-December 4
Machine learning
Nearest neighbors demo

Dataset used for the demo (extracted from US Army anthropometric data)

Decision tree classifier demo

Dataset used for the demo (Fisher's famous iris dataset)
Discussion section exercises for December 3-4.

Matplotlib demo

Old Faithful data set

Life expectancy data set
Assignment 9 due Monday December 10

Dataset for the assignment (Wisconsin breast cancer study)
December 6
Review sheet from a few years back

The final exam from 2014

The final exam from 2015

The final exam with solutions