Exercise #2 for CSci 211.