Course Information
Section 3: MWF 11:30–12:20, Sci Cntr 256 (the Birds' nest)
Professor: Jeff Knerr
Piazza: CS21 Q&A forum
Office: Sci Cntr 238A (at back of 240 and 238)
Office hours: I will definitely try to be around on
Mondays from 2-4pm. You can also stop by whenever my door is open. I usually work from home on Thursdays.
Other Sections:
Zachary Palmer (TR 8:30am–9:45am)
Richard Wicentowski (TR 9:55–11:10)
Andrew Danner (TR 9:55–11:10)
Welcome to CS21. This course will introduce fundamental ideas in computer
science while also teaching you how to write computer programs. We will
study algorithms for solving problems and implement solutions in the
Python programming language. Python is an
interpreted language that is known for its ease of use. We also introduce
object-oriented programming and data structures. A deeper coverage of these
topics will be presented in CS 35.
This course is appropriate for all students who want to learn how to write
computer programs and think like computer scientists. It is the usual first
course for computer science majors and minors. Students with advanced placement
credit or extensive programming experience should place out of this course and
instead begin with CS31 or CS35.
Textbook:
See the
Schedule
for each week's reading assignment. We will primarily be using the online book
How to think like a computer scientist: Learning with Python by Elkner, Downey and Meyers.
Here are a few other useful online python resources:
Goals for the course:
By the end of the course, we hope that you will have developed the
following skills:
- Given a program, be able to simulate on paper how a computer would
execute the program, and show the results that would be produced.
- Given a problem, be able to design a clear, concise, and
correct pseudocode algorithm to solve it.
- Given a pseudocode algorithm,
be able to successfully implement it in Python.
- Be able to use top-down design to sub-divide a large problem into
reasonably-sized modular sub-problems.
- Given several algorithms for solving the same problem, be able
to analyze which algorithm would be more efficient in terms of running
time.
- Develop debugging and unit testing skills. Consistently use
these skills while implementing programs.
Schedule
This is a tentative schedule; it may change as we go.
WEEK |
DAY |
ANNOUNCEMENTS |
TOPIC & READING |
LABS |
1 | Aug 31 | | Introduction to Python and Unix
- python and unix
- data types
- variables, assignment
- calling built-in functions
print() , type() , int() , float() , str()
- user input:
raw_input()
- writing and running a program
for loops, sequences, range()
- Ch 1: The way of the program
- Ch 2: Variables, expressions and statements
- Ch 4, Sec 9: keyboard input
- Ch 4, Sec 10: type conversion
- Ch 2b: lists, looping,
range()
| In class: M W F
Lab 00: unix, editing |
Sep 02 | |
Sep 04 | |
2 | Sep 07 | | Writing simple programs
def main()
- more
for loops
- accumulator pattern
- strings and lists: mutable vs immutable
- indexing, slicing,
len()
print() , print formatting
from math import *
- Ch 2: Variables, expressions and statements
- Ch 2b: lists, looping,
range()
- Ch 7: Strings (sections 1-4, 6, 13 only)
- Ch 9: Lists (sections 1-3, 5, 6, 8)
| In class: M W F
Lab 01: first programs |
Sep 09 | |
Sep 11 | Drop/add ends |
3 | Sep 14 | | Conditionals
| In class: M W F
Lab 02: nums and strings |
Sep 16 | Quiz 1 Topics |
Sep 18 | Quiz 1 |
4 | Sep 21 | | First functions, while loops
| In class: M W F
Lab 03: if/else |
Sep 23 | |
Sep 25 | |
5 | Sep 28 | | Graphics, Using Objects
| In class: M W F
Lab 04: while loops and functions |
Sep 30 | Quiz 2 Topics |
Oct 02 | Quiz 2 |
6 | Oct 05 | | Fruitful Functions
| In class: M W F
Lab 05: graphics |
Oct 07 | |
Oct 09 | |
| Oct 12 | Fall Break |
Oct 14 |
Oct 16 |
7 | Oct 19 | | File IO, Top-Down Design
| In class: M W F
Lab 06: lists & functions |
Oct 21 | Quiz 3 Topics |
Oct 23 | Quiz 3 |
8 | Oct 26 | | Searching
| In class: M W F
Lab 07: word warp design |
Oct 28 | |
Oct 30 | |
9 | Nov 02 | | Sorting
| In class: M W F
Lab 07: word warp |
Nov 04 | Quiz 4 Topics |
Nov 06 | CR/NC/W Deadline
Quiz 4 |
10 | Nov 09 | | Recursion
| In class: M W F
Lab 08: twitter |
Nov 11 | |
Nov 13 | |
11 | Nov 16 | | Classes and Objects
| In class: M W F
Lab 09: recursion |
Nov 18 | Quiz 5 Topics |
Nov 20 | Quiz 5 |
12 | Nov 23 | | Classes and Objects
| In class: M W
Lab 10: Triad |
Nov 25 | |
Nov 27 | Thanksgiving |
13 | Nov 30 | | Linked Lists
- python list vs linked list
Node() class
LinkedList() class
- linked list methods
- analysis of algorithms
- Ch 18: Linked Lists
| In class: M W F
Lab 10: Triad |
Dec 02 | Quiz 6 Topics |
Dec 04 | Quiz 6 |
14 | Dec 07 | Final Exam Topics
| Wrap up | In class: M
Lab 11: LinkedLists |
Dec 11 | Final: 7-10pm Science Center 101 |