Announcements
- Lab 12 is good practice for the final exam
- Our
final exam
is Saturday, May 6, 7-10pm, in Sci Cen 101
- Final Exam Review Sessions:
- Wednesday, May 3: 1-2:30, 181 Sci Center (Mauskop)
- Thursday, May 4: 2:30-4pm, 183 Sci Center (Newhall)
- Friday, May 5: 1-2:30, 181 Sci Center (Knerr)
Course Information
Section 2: MWF 11:30–12:20, Sci Cntr 256
Professor: Jeff Knerr
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:
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:
We will primarily be using the online book
How to think like a computer scientist: Learning with Python by Elkner, Downey and Meyers.
See the
Schedule for each week's reading assignment.
Here are a few other useful online 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 | Jan 16 | MLK Day...no classes
| 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 topics:
lecture 0
variables
for loops
Lab 0: unix, editing |
Jan 18 | |
Jan 20 | |
2 | Jan 23 | | 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 topics: slicing,indexing
string formatting
accumulator
Lab 1: first progs |
Jan 25 | |
Jan 27 | |
3 | Jan 30 | Drop/add ends | Conditionals
| In class topics:
branching
and, or, not
vim tips
Lab 2: numbers and strings |
Feb 01 | Q1 Study Guide |
Feb 03 | Quiz 1 |
4 | Feb 06 | | First functions, while loops
| In class topics: while loops
functions
Lab 3: branching |
Feb 08 | |
Feb 10 | |
5 | Feb 13 | | Graphics, Using Objects
| In class topics: graphics
Lab 4: rock-paper-scissors |
Feb 15 | Q2 Study Guide |
Feb 17 | Quiz 2 |
6 | Feb 20 | | Fruitful Functions
| In class: more functions
Lab 5: graphics |
Feb 22 | |
Feb 24 | |
7 | Feb 27 | | File IO, Top-Down Design
| In class: file i/o,top-down design
Lab 6: bugs |
Mar 01 | Q3 Study Guide |
Mar 03 | Quiz 3 |
| Mar 06 | Spring Break |
Mar 08 |
Mar 10 |
8 | Mar 13 | | More TDD
| In class: file i/o, top-down design
Lab 07: cryptoq design |
Mar 15 | |
Mar 17 | |
9 | Mar 20 | | Searching
| In class: searching
Lab 07: cryptoq |
Mar 22 | Q4 Study Guide |
Mar 24 | CR/NC/W Deadline
Quiz 4 |
10 | Mar 27 | | Sorting
| In class: sorting
Lab 8: climate data |
Mar 29 | |
Mar 31 | |
11 | Apr 03 | | Recursion
| In class: recursion
Lab 9: sorting |
Apr 05 | Q5 Study Guide |
Apr 07 | Quiz 5 |
12 | Apr 10 | | Classes and Objects
| In class:
classes and objects
Lab 10: recursion |
Apr 12 | |
Apr 14 | |
13 | Apr 17 | | Classes and Objects
| In class:
classes and objects
Lab 11: bug graphics |
Apr 19 | |
Apr 21 | Q6 Study Guide |
14 | Apr 24 | Quiz 6 | Linked Lists
- python list vs linked list
Node() class
LinkedList() class
- linked list methods
- analysis of algorithms
- Ch 18: Linked Lists
| In class:
linked lists
Lab 12: linked lists |
Apr 26 | |
Apr 28 | Final Topics |
| May 06 | Final Exam: Sat, May 6, 7-10pm, Sci Cen 101 |