Bryn Mawr College
Computer Science Department
CS 110: Introduction to Computing
Fall 2007
Course Materials
Associate Professor Douglas S. Blank

Information Texts Links  Important Dates  Grading  Schedule

General Information

Instructor: Douglas S. Blank, 248 Park Hall, 526-6501
E-Mail: dblank (AT) cs (DOT) brynmawr (DOT) edu

Lecture Hours: Tuesdays & Thursdays, 2:30 p.m. to 4:00.m.
Room: Park 338
Lab: TBA


Lab Assistants: The following Lab assitants will be available during the week (names and schedules will be posted by the end of this week) for assistance on lab assignments.

  1. Doug Blank (dblank): TBA
  2. Michelle Beard (mbeard): TBA
  3. Ashley Gavin (agavin): TBA
  4. Mansi Gupta (mgupta): TBA
  5. Anne Miller (amiller): TBA
  6. Marwa Muhammad (mmuhamad): TBA
  7. Shikha Prashad (sprashad): TBA
  8. Emily Stomach (estomach): TBA
  9. Please see for up-to-date TA hours.

These are the hours when the Lab will not be available:

  1. TBA

Texts & Software

Python Programming: An Introduction to Computer Science: by John Zelle, Franklin Beedle & Associates, 2004. ISBN 1-887902-99-6

Python Software + IDLE + Myro (This software is already installed in the Computer Science Lab). The software is also available for your own computer from the CD included in your text.

Graphics Library (accompanies and distributed with the text is also installed in the lab)

IPRE Robot Kit: These will be handed out to you in Week#2.

Introduction to Computer Science via Robots, by IPRE, 2007 (available online, click here).


Course Links

  1. Edventure, Course Management System
  2. Institute for Personal Robots in Education
  3. HTML documentation of
  4. A database of color names

Robot Videos

  1. The Humans are Dead and the Binary Solo
  2. Ben Axelrod's Robots of Today

Important Dates


All graded work will receive a percentage score (0 to 100). At the end of the semester, a final grade will be assigned that will be one of the following: 4.0, 3.7, 3.3, 3.0, 2.7, 2.3, 2.0, 1.7, 1.3, 1.0, or 0.0. This value will be calculated as a weighted average of all grades according to the following weights:


  1. Assignment #1: (Due on Tuesday, September 11, 2007, in class) Do one of the following: Execrise 1, Exercise 2, Exercise 3, or Exercise 4 from Chapter 1 of ICSvR (based on your own preference). Submit a printed short paper no longer than 3-5 pages (single spaced with 1-inch margins).
  2. Assignment #2: (Due on Thursday, September 20, 2007, in class):
    1. Read Chapter #3, in Introduction to Computer Science via Robots
    2. Read Chapter #2, in Programming Python
    3. Do exercises #2, and #3 in Chapter #3 Exercises, in Introduction to Computer Science via Robots

      BONUS: Attend Wednesday's Talk on the "Philosophy of Computer Science" and write a brief summary at

  3. Assignment #3: (Due on Thuesday, September 25, 2007, in class):
    1. Read Chapter #4, in Introduction to Computer Science via Robots
    2. Read Chapter #3, in Programming Python
    3. Do exercises #2, #3, and #4 in Chapter #4, Proprioception, in Introduction to Computer Science via Robots.

      BONUS: Do #6 Chapter #4, Proprioception: Try writing a program to draw other shapes: the outline of a house, a stadium, or create art by inserting pens of different colors (you can write the program so that the robot stops and asks you for a new color, too).

  4. Assignment #4: Robo-archaeologist. Your mission is to make it into the Pyramid, take pictures of the hieroglyphics, and make it out of the tomb. Pictures.
  5. Assignment #5: Find the Pyramid. Your mission is to start your robot off somewhere in the lab, and let the robot find the pyramid. Bonus points if you can get very close to the pyramid without touching it, and signaling that you have found it (beep() or speak("I've found the pyramid!")). (For fun, get a bunch of your friends together and start out equi-distant from the pyramid. The winner is the first to the pyramid. Last one there is a rotten egg!
  6. So, this assignment will require you to do two things:

    1. Look at all of the pixels, keeping track of the orange ones
    2. Decide to turn left, right, or move forward

    The first part is written like:

    pic = takePicture()
    # initilize some variables here
    for pixel in getPixels(pic):
        if getColor(pixel) == 255: # bright red
            # do something because they match

    Now, what would help you decide what to do? If you knew where the matching orange pixels were, that would help. You can find out where a pixel is with:

            x = getX(pixel)
            y = getY(pixel)

    But that is only one pixel. What you really want to know is where all of the matching orange pixels are. But that is too much information. You could take the average, and that would tell you the general direction of the Pyramid. To compute the average, you need to sum up all of the x's and the y's of the matching pixels, and then divide by the total matching pixels. Here is a little program that sums up the x's and y's for an entire picture::

    # initialize the variables:
    x = 0
    y = 0
    for pixel in getPixels(pic):
            x = x + getX(pixel)
            y = y + getY(pixel)
    and then you could compute the average by dividing by the total count of matching pixels:
    # initialize the variables:
    x = 0
    y = 0
    total = 0
    for pixel in getPixels(pic):
            x = x + getX(pixel)
            y = y + getY(pixel)
            total = total + 1
    print "Average x:", x / total
    print "Average y:", y / total

    But that will just give you the average position of ALL of the pixels. You'll need to only add the x's and y's of the matching pixels, and only divide by the number that match.

    Finally, you should use those values to decide to go left, right, or straight:

    if x/total > getWidth(pic)/2: 
        # on right half of screen
        # on left half of screen

    But when do you go straight? Divide by two, get two halves, divide by three and ...

    Hopefully this will give you some useful hints as to how to solve the "Find the Pyramid" puzzle.

  7. Midterm Review

  8. Assignment #6: Representational Art

    Read Chapter 5, Python Programming.

    Draw a representation of yourself in Python using Myro that includes your name. I'd like a copy of the picture. One easy way to get a picture is to save it as in Postscript format. If you want to save the picture in a file called "" you can do the following:
    from myro import *
    win = GraphWin()
    p1 = Point(25, 50)
    p2 = Point(75, 50)
    t = Text(Point(100, 50), "Doug")
    Then, please send me the file "", and print out your program to hand in. You should center the name at the bottom of the picture. Feel free to use colors. Have fun; be creative!
    Results so far


  9. Assignment #7: Games!

    You should form teams of two or three. Design a game using your knowledge of Python and Myro. Feel free to use the Gamepad and graphics from your book. Goal: make it fun! Due December 6, 2007, in class.

    To complete this assignment:

    1. Turn in (electronic and hardcopy) your source code and a user's manual on how to play your game. Include pictures of your screen in your manual.
    2. Include a section of the manual detailing the team members, and what each person did.
    3. Give a demo of your game for the class on December 6.


  10. What is computer science?
    1. Hal Abelson's first day of class at MIT

Upcoming Events

Robot Conflict October 20, 2007, at the Franklin Institute.

Engineering Politics, Good Magazine.

Urban Challenge


Created by dblank, September 3, 2007.