Ma/CS 21: Programming I (Python 3)

Professor Jessica Kintner

This is the course web page for CS 21, Spring 2020. This is intended to be a first course in computer programming. The course will be in Python 3.

Jessica Kintner's Information:

  • Office: Gal 106-B
  • Cell phone: (925)408-4419
  • Office hours: Please email me or text me to schedule a zoom appointment
  • email:

Class Information

  • Syllabus
  • Tentative Schedule
  • Google Colab
    You may have to click on something like "Welcome to Colaboratory" or Examples at the top.
  • Jessica's shared google drive for this class.
  • The textbook will be: Python Programming: An Introduction to Computer Science, 3rd ed, by john zelle. Here is the link to the text on Amazon so you can see it. There are many other ways to get a copy. You can rent it, you can buy a used copy. I don't think I've seen an e-version.

Zoom Information

  • Class meetings
  • Office hours: Please email me or text me to schedule a zoom appointment

Exam Information

Recent announcements:

  • (4/29) Updated the exam 2 section to the left. (The info was all here, I just collected it for you in one place.)
  • (3/21) Updated last pics of whiteboards to google drive. (Since we are online now, I assume these will be last.) click here for pics of whiteboard in google drive (by day/date).
  • (3/20) I updated HW grades on moodle--please ignore the "max score"s of 100. Those are mistakes. It's also a good idea to ignore moodle's total grade scores. Remember I will drop some low HW scores at the end.
  • (3/16) Exam 1 postponed to Mar 26 In light of the new "Shelter in place" order, which caused the College to ask some students to travel home--I am going to postpone the exam.
  • (3/12) Instruction will move to online (College-wide decision) from 3/16 through at least Easter Break. Zoom links added here and in moodle.
  • (3/5) Exam 1 is two weeks from today! I'm adding a section to this page with Exam Info.
  • (2/27) Starting with HW04, please submit your programs via moodle.
  • (2/25) If you have your own laptop, working on it will definitely be easier for the graphics parts of the course. I added links below to get you any software you need.


Python itself

  • You can download the basic Python 3 from -- Just hit the "downloads" tab. (This includes IDLE.)
  • If you want to install your own version of jupyter notebook (Colab is google's version of this), follow the instructions here, at (I used conda on my macbook.)

Zelle's graphics stuff


Due (by 8am)
Ch 1-10
more review for Final
review problems
HW11: Ch 9 PE 10 and Ch 10 PE 5
my solns
Ch 10
HW11 part 2 Ch 10: Disc 3, PE 5, 7, 8
Ch 9
HW11 part 1 Ch 9 PE 8, 9, 10
Ch 6-9
MidExam 2
Ch 6-9
Review for Midterm Exam 2
practice for midterm 2 This was also emailed to you.
my (partial) solutions
Ch 9
more random number info, seed(), C14 example
zoom recording of class
colab file with the examples

from HW09 one colab file (.ipynb) with problems function review 3 and Ch 8 PE 6. (Submit in moodle.)
my solutions
Ch 8
HW09 part 2: (see today's colab for details) Ch 8 MC 6-9, PE 3-6
from HW08: Ch 7 PE 2 (.ipynb) and 17 (.py) (Submit to moodle)
no class
Spring Break
no class
Spring Break
Ch 7 (skip 7.4)
HW08 part 2 Ch 7 PE (in IDLE) 17
Ch 7 (skip 7.4)
HW08 part 1 Ch 7 PE (in colab) 1, 2, 4, 6, 8, 11, (in IDLE) 16
Midterm Exam 1
HW06 (submitted to moodle. The problem asks for input and output files. I said output only is fine. If you do make an input file, you'll have to submit that as well!)
upload your answers to moodle if you haven't already done so!
Ch 5, 6
Review Ch 5 for first exam
start functions
meet in zoom 8:30am, links above
video of 3/17 zoom session
Read 6.1-4, type all examples in 6.2, HW07 part 1: Ch 6 PE 1, 3
Ch 4
Ch 4 review
zoom practice
HW05 Ch 5 PE 3 (.ipynb) and PE 15 (.py) please use infileFor5-15.txt submitted separately to moodle
Ch 5-6
reading and writing files
Ch 3 review, plus new Ch 5 practice.
HW06 part 1 Ch 5 PE 13 (write out a file is fine)
Ch 5
More HW05 Ch 5 PE (in Colab) 5, 6, 9, 10, (in Python/IDLE) 15 please use infileFor5-15.txt
HW04: two files, PE 1 and PE 9 submit in moodle
Ch 5
HW05 Ch 5: PE 2, 3
Ch 4
Object Oriented Programming, graphics examples
Ch 4 Disc 3, as discussed in class
today's handout
Do Ch 4 PE 2 and 4, HW04: PE 1 and 9
HW03 (both parts in one file please!)
Ch 4
Work through all the code examples in Ch 4. You can skip anything with a bar chart (this is section 4.5 and part of 4.6)
Ch 3
Integers, real numbers, bits, and binary
Binary/Decimal Practice
HW03 part 1 Ch 3: DE 6, PE 1, 2 (Please don't submit till after Thurs)
Ch 2
Simple Programs
day02 colab file
HW02 Ch 2: all multiple choice Q'
Disc 4, and PE 9, 5, 10, 11
Your .ipynb file with PE 1.1
Ch 1
Intro and overview
My intro to Colab
Read/Skim Ch 1, be able to answer the multiple choice questions
In Colab, do PE (Programming Exercises) 1, 2, 4 Save the .ipynb file so that you can turn it in. Here is the page from text.