CS2110: Programming for Informatics
Spring 2021
11:30-12:20 MWF, on line
Instructor:
James Cremer, 101P MLH, james-cremer@uiowa.edu, 319-321-1893
Office hours: T 1-2, Th 1-2 and by appointment.
TA:
Jon Rusert, jonathan-rusert@uiowa.edu
Office hours: W 2-4, F 1-2
Discussion sections:
Section A01 2:00-3:15 T On line
Section A02 3:30-4:45 T On line
The TA will lead the discussion section meetings, help grade some of the homework,
and hold regular office hours.
CS1110 is a prerequisite (i.e. you must already have completed CS1110 or something equivalent).
A math course at the level of MATH1010, 1020, 1240, 1340, or 1440 is a corequisite (i.e. if you haven't already
completed such a course, or placed into a higher level course by exam, you must be enrolled in one right now)
This course has one primary goal - to provide a core of computer science
programming concepts and skills and enough practice using them that
students will develop critical confidence in their ability to
to be able to solve real problems via programming. In additional to basic programming
concepts, the course provides an introduction to object-oriented programming, algorithmic design/analysis, and to
programming with the web/networks and graphical user interfaces.
Python is the language
used in the course, but we hope that students will understand the underlying concepts well
enough to be comfortable picking up other languages.
The overall structure of the course is:
- 6-7 weeks for fundamentals of programming in Python
- 8-9 weeks for more advanced programming, object-oriented programming, algorithms,
web/network programming, and graphical user interfaces
The primary textbook for this course is How to Think Like a Computer Scientist. Learning with Python: Interactive Edition 2.0, by Brad Miller, David Ranum, Jeffrey Elkner, Peter Wentworth, Allen B. Downey, Chris Meyers, and Dario Mitchell. It is free but requires registration and login. When you register, enter "CS2110S21" in the Course Name field. This book is a "mash-up" of a well-known the "open-source" text listed below. This interactive version
intersperses a variety of automatically checked questions, exercises, and coding examples with the a
re-organized and modified version of the Think Python (1st edition) text.

The interactive book above is based on Think Python, 2nd edition by Allen Downey. If you do not want to use the interactive version, you can use this one instead. It is a free well-known book that has been used by many people and courses.
Free HTML and downloadable PDF versions are available at thinkpython2.com.
You can purchase a printed version at Amazon.
Course grades will be based on the five components below. 200 points possible:
- Homework assignments (60 points): 11 of them, 6 points each. Your lowest score will be dropped.
- Discussion section assignments (30 points): 11 of them, 3 points each. Your lowest score will be dropped.
- In-class quizzes (75 points): 4 of them (15, 20, 20, and 20 points). Dates: Feb. 12, Mar. 5, Mar. 26, Apr. 23
- Final Exam (35 points): Tuesday, May 11, 3-5pm
Plus/Minus grading will be used for the course.
For full credit, homework must be submitted on time. Late submissions will be accepted only when these two conditions are met: 1) a first version (even if minimal work has been completed) is submitted by the regular deadline 2) the "late" and presumably improved version is submitted within 24 hours of the original deadline. The score for the homework will be the higher of the first submission score and 80% of the score on the late version.
Starting early is important, especially for programming assignments.
Except in special circumstances (see the University's policy
on "Excused Absences from Examinations"), there will be no make-up exams.
- Lecture slides (part 1) and (part 2) from 5/7. Code: testProgramOnInput.py, doesItHalt.py, doesItHaltTest.py.
- Lecture slides (part 1) and (part 2) from 5/5. Code: kmeans.py.
- Lecture slides (part 1) and (part 2) from 5/3. Code: sudoku.py.
- Lecture slides from 4/30. Code: twitteraccess.py.
- Lecture slides from 4/28. Code: getWebPage.py.
- Lecture slides from 4/26. Code: geocodeonly.py.
- Lecture slides from 4/21. Code: radioButton.py, slider.py.
- Lecture slides from 4/19. Code: simplegui1.py, simplegui2.py, simplegui2wClass.py.
- Lecture slides from 4/16. Code: globalVars.py, minimal.py, minimal2.py.
- Lecture slides from 4/12. Code: dfs.py.
- Lecture slides from 4/9. Code: bfs.py.
- Lecture slides from 4/7. Code: basicgraph.py.
- Lecture slides from 4/5.
- Lecture slides from 4/2. Code: lec30a.py, lec30b.py, lec30sorts.py.
- Lecture slides from 3/31. Code: lec29sorts.py, lec29b.py.
- Lecture slides from 3/29.
- Lecture slides from 3/24. Code: lec26.py, appendvsinsert.py.
- Lecture slides from 3/22. Code: mixupTests.py, lec25coins.py, lec25pi.py, montyhall.py.
- Lecture slides from 3/19. Code: foo.py, catdogV2.py.
- Lecture slides from 3/17. Code: time2Alt.py, catdog.py, circle.py.
- Lecture slides from 3/15. Code: time1.py, time2.py.
- Lecture slides from 3/12. Code: exceptions.py.
- Lecture slides from 3/10. Code: lec20.py, ToHcomplete.py.
- Lecture slides from 3/8. Code: lec19.py.
- Lecture slides from 3/3. Slides and code on simple image editing: simpleImageEditing.pdf, simpleImageManip.py, HNflowers.gif.
- Lecture slides from 3/1. Code: lec16a.py, lec16.py.
- Lecture slides from 2/26. Code: birdDict.py, birdsseen.txt, lec15split.py.
- Lecture slides from 2/24. Code: lec14.py, ppldata.py, people.txt, lec14exercises.py, lec14exercisesB.py.
- Lecture slides from 2/22. Code: biggestAnagramSetWFast.py, lec13.py, dicttest.py.
- Lecture slides from 2/19. Code: lec12forwhile.py, lec12append.py, biggestAnagramSet.py.
- Lecture slides from 2/17. Code: lec11.py, lec11b.py.
- Lecture slides from 2/15. Code: lec10loopchars.py, lec10findChar.py, lec10exercises.py, lec11.py.
- Lecture slides from 2/10. Code: collatz.py, charExamples.py, lec8primes.py.
- Lecture slides from 2/8. Code: lec7while.py, charExamples.py.
- Lecture slides from 2/5. Code: lec5and6localvars.py, lec6ifs.py, lec6while.py
- Lecture slides from 2/3. Code: lec5.py
- Lecture slides from 2/1. Code: lec4.py
- Lecture slides from 1/29.
- Lecture slides from 1/27.
- Lecture slides from 1/25.
- Files for Discussion Assignment 11, due Thursday, May 6 by 5:00pm: ds11.html.
- Files for Discussion Assignment 10, due Wednesday, April 28 by 5:00pm: ds10.pdf, geocodeonly.py, readSaveGeodict.py, fibCache.py.
- Files for Discussion Assignment 9, due Tuesday, April 20 by 5:00pm: ds9.pdf, ds9game.py.
- Files for (optional) Discussion Assignment 8x, due (if you want "make-up" points) Tuesday, April 13 by 10:00pm: ds8x. If you submit this assignment, you can receive up to 3 points to make up for any previously missed DS points.
- Files for Discussion Assignment 8, due Sunday, April 11 by 5:00pm: ds8.py, wordsTest.txt, words5.txt.
- Files for Discussion Assignment 7, due Wednesday, March 31 by 5:00pm: ds7.pdf, ds7.py.
- Files for Discussion Assignment 6, Friday, March 19 by 5:00pm: ds6.py, stack.py, circle.py.
- Discussion assignment 5, due Monday, Mar. 1, by 11:59pm.
- Files for Discussion assignment 4, due Tuesday, Feb. 23, by 10:00pm: ds4.py, wordsMany.txt
- Files for Discussion assignment 3, due Tuesday, Feb. 16, by 10:00pm: ds3.py, wordsFew.txt, wordsMany.txt
- Discussion assignment 2, due Tuesday, Feb. 2, by 5:00pm.
- Discussion assignment 1, due Tuesday, Feb. 2, by 5:00pm.
- Homework 11, due Sunday, May 9, by 5:00pm.
- Homework 10, due Saturday, May 1, by 10:00pm.
- Homework 9, due Sunday, April 25, by 10:00pm.
- Homework 8, due Thursday, April 15, by 10:00pm.
- Homework 7, due Wednesday, April 7, by 10:00pm.
- Homework 6, due Thursday, Mar. 25, by 10:00pm.
- Homework 5, due Monday, Mar. 15, by 10:00pm.
- Homework 4, due Thursday, Mar. 4, by 10:00pm.
- Homework 3, due Thursday, Feb. 22, by 10:00pm.
- Homework 2, due Monday, Feb. 11, by 10:00pm.
- Homework 1, due Thursday, Feb. 4, by 10:00pm.
Computers available
For implementing homework assignments, there are Windows and Linux PCs in 301 MLH,
though most of you will find it most convenient to use Python on your own machines.
Documenting and submitting programs
For assignments that contain programming components, you must submit files via ICON.
Homework assignments will usually give any special details. However,
in general, Python code must be submitted in .py files (not .txt, .rtf, .doc, etc.)
If the assignment contains multiple files, you should put them all in one folder, zip it,
and submit the one .zip file to ICON.
Note: It is very important that programs be well-written and clear. Programs
should be readable by people, not just computers. Coding style and organization may
be considered in grading programs. Your code should include comments where appropriate, but
avoid the approach of ritualistically filling your code with unhelpful (e.g. "this
is a variable") or imprecise (e.g. "this loop goes around and around
until it figures out the answer") comments. Ambiguous or inaccurate comments can be worse
than none at all.
We will use Python 3 (version 3.8 or newer recommended). No versions of Python 2 are acceptable.
- Python (and the Idle IDE for Python) is available on the Windows and Linux computers in 301 MLH.
- You can download and install Python and IDLE on your own computer from http://www.python.org/download BUT read the next bullet item for a recommended alternative.
- During the second half of the course, we will probably use several third-party modules (libraries). Sometimes these modules are not easy for people to install. A few organizations have created Python
distributions that make access to these modules much easier. For this course, I recommend that you:
- download and install the Anaconda package (by Continuum Analytics). The Anaconda package contains several tools. For this class, use the Spyder IDE that can be launched from within Anaconda-Navigator app.
It is free, works on Macs, PCs, and Linux machines, and provides super easy access to a large number of Python modules.
Scores are available on ICON only.
- MIT 6.00.1x EdX course. This is my favorite online Python course, developed and taught by really good MIT professors. It is free (though if you want to get a "verified certificate" you will need to pay) The online exercises, homeworks, and exams are graded automatically; if you can successfully do all of the work in the online 6.001x, you're likely to do very well in CS1210. Prof. John Guttag's
accompanying book Introduction to Computation and Programming Using Python is also one of my favorites, clear and concise, though probably not best as your only source of material for this course.
- Online Python Tutor website allows stepping forward (and backward) through Python code and visualizing variable values as they are updated.
- Coding Bat - interactive python exercises
Academic dishonesty will not be tolerated. Under no circumstances should you
pass off someone else's work as your own. This applies to code or other material that you
might find on the internet.
In this class, unless specifically allowed otherwise for a particular assignment,
you may not collaborate on homework assignments; you need to complete assignments on your own.
We do want students to talk to
each other about concepts, solution approaches, and other ideas related to the coursework and assignments.
However, it is important to ensure that these discussions do not result in a written or electronic record, nor exchange or sharing of written or electronic material.
Use of code from the web is also not allowed unless a particular assignment specifies otherwise.
Even in cases where it is appropriate to incorporate code from the Internet or other reference source,
such inclusion must be properly cited/credited (this is often done by inserting comment lines
prior to the borrowed code stating where you got them, providing a URL, etc.)
Please note: We regularly use available software plagiarism detection
tools to test originality of homework submissions.
See the CLAS Code of Academic Honesty for additional information.
Additional UI and College of Liberal Arts and Sciences policies relating to this class are given here. This includes information about the administrative home for the course, accommodations for disabilities, complaint procedures, etc.
(Note that the complaint policy mentions the DEO. The DEO, or Department Chair, for the Computer Science Department is Professor Alberto Segre).