CPSC 120 Principles of Computer Science Spring 2008

CPSC 120 Syllabus

 AssignmentsImportant Dates

Week 1: 1/21-1/25

Topics: course introduction; computation and representation; logical circuitry

Reading: TMCM ch 1-2.1

Lab 1 Preparation Worksheet
Lab 1: The Web, Java, and DataReps
writeup due Wed 1/30
(selected solutions)

Week 2: 1/28-2/1

Topics: logical circuitry; binary arithmetic

Reading: TMCM ch 2.1-2.2

Homework 1
due Fri 2/1
(selected solutions)
Lab 2 Preparation Worksheet
Lab 2: xLogicCircuits #1
writeup due Wed 2/6

Week 3: 2/4-2/8

Topics: binary arithmetic; an arithmetic-logic unit; memory

Reading: TMCM ch 2.2-2.3

Homework 2
due Mon 2/18
Lab 3 Preparation Worksheet
Lab 3: xLogicCircuits #2
writeup due Wed 2/13

Week 4: 2/11-2/15

Topics: building an electronic computer

Reading: TMCM ch 3.1-3.4

Lab 4 Preparation Worksheet
Lab 4: xComputer
writeup due Wed 2/20

Week 5: 2/18-2/22

Topics: non-electronic computers; introduction to Linux

Reading: the reading from homework 2

  midterm #1
in class Wed 2/20
(review information)
solutions (PDF - get Adobe Acrobat if you need it)
Lab 5: Introduction to Linux
writeup due Wed 2/27

Week 6: 2/25-2/29

Topics: introduction to programming; python


  • TMCM ch 5.1-5.2, ch 6
    For chapter 6, you don't need to worry about the exact syntax of xTurtle (we'll be studying a different language - python - instead), but the ideas about names, variables, subroutines, parameters, assignment statements, loops, decisions, and building programs from a collection of statements are common to many different programming languages (including python).
  • Non-Programmers Tutorial for Python - sections Hello World, Who Goes There, Count to 10, and Decisions


Lab 6: Introduction to Python and Programming
writeup due Wed 3/5

Week 7: 3/3-3/7

Topics: special lecture on computer vision; python

Reading: Non-Programmers Tutorial for Python - sections Debugging, Defining Functions, Lists


  • area.py (functions to compute area and perimeter)
Lab 7: Functions
writeup due Wed 3/26
(solution for #6)

Week 8: 3/10-3/14

Topics: python

Reading: Non-Programmers Tutorial for Python - sections Debugging, Lists, Boolean Expressions


  • birthday.py (computing the year the user was born)
  • diceroll.py (roll a pair of dice and count the number of times a particular number is rolled)
spring break


Week 9: 3/24-3/28

Topics: python

Reading: review the already-assigned sections of the Non-Programmers Tutorial for Python


  • working with lists
    • calendar1.py (converting month number to name and number of days)
    • calendar2.py (printing number of days in each month, for all 12 months)
    • calendar3.py (check if a date is a legal month and day)
    • calendar5.py (convert month name to a number)
  • working with lists, and algorithms
    • rhymegame.py (children's counting-through-a-rhyme game)
    • rhymegame2.py (children's counting-through-a-rhyme game; user enters the player names and rhyme)
Lab 8: Binary Number Converter
writeup due Wed 4/2
(solution for #1-3)

Week 10: 3/31-4/4

Topics: graphics and animation



  • shapes.py (VPython program with several shapes)
  • bounce.py (VPython animation - bouncing ball)
Lab 9: Graphics and Animation
writeup due Wed 4/9

Week 11: 4/7-4/11

Topics: graphics and animation; modeling and simulation, artificial life; exam



  midterm #2
in class Wed 4/9
(review information)
solutions (PDF - get Adobe Acrobat if you need it)
Lab 10: Nim AI
writeup due Wed 4/16
(solution for the nim program)

Week 12: 4/14-4/18

Topics: the computer as human; the computer as oracle


  • TMCM ch 12
  • articles: "Can you prove you're not a machine?", "A Smarter Computer to Pick Stocks", "An Oracle for Our Time, Part Man, Part Machine" (handed out in class)
  • articles: "California shoppers, Schwarzenegger is watching you", "Homeland Security tracks travelers' meals", "Software Being Developed to Monitor Opinions of U.S." (handed out in class)
Lab 11: Introduction to HTML
writeup due Wed 4/23

Week 13: 4/21-4/25

Topics: the computer as human; the computer as oracle

Reading: the readings assigned in week 12, plus at least one of the following HTML tutorials:

  • HTML Primer (the "Basic HTML" sections) - this is a tutorial-style introduction with a chatty style
  • W3Schools HTML Tutorial (the "HTML Basic" section, except for the frames, tables, and forms subsections) - a more in-depth, less chatty tutorial


Lab 12: More HTML
writeup due Wed 4/30

Week 14: 4/28-5/2

Topics: what computers can and can't do

Reading: TMCM ch 4


Note: Wednesday lab!
Lab 13 Preparation Worksheet
Lab 13: Turing Machines
writeup due Tue 5/6

Week 15: 5/5-5/6

Topics: what computers can and can't do

Reading: TMCM ch 4


Reading Period and Exams: 5/7-5/13

  final exam
Tue 5/13 7-10pm
(review information)

Valid HTML 4.01!