Problem Set 2, CS 257

Due before 4am, Tuesday Sep 9, 1997 - i.e. very late Monday night
  1. Do the following problems from the book:

    4.4
    4.8
    4.10
    5.12
    5.13
    5.14
    5.20
    6.1
    6.3
    6.5
    6.11

  2. Define a function harmonic which computes the sum of the first n elements of the harmonic series:

    (harmonic 0) = 0
    (harmonic 1) = 1/1 = 1
    (harmonic 2) = 1/1 + 1/2 = 1.5
    (harmonic 5) = 1/1 + 1/2 + 1/3 + 1/4 + 1/5 = 2.2833333

  3. Define a procedure (bopper side) which uses the turtle to draw a picture like that below, with the argument to the function being the length of the first upstroke.

  4. Define a procedure circle-sentence which takes a sentence and draws its words on the edge of a circle (or really an n-gon for some large n). For instance, doing
    (circle-sentence '(we can meet at your convenience my sweet little sugar plum))
    should result in something like this:
Important: Turn in this problem set by running the program ~barak/bin/submit file1.scm file2.scm ...

All the files should be legal scheme code, with comments indicating which fragment of code corresponds to which problem, and comments with any answers to questions that require answers to be in English rather than Scheme.

You must submit all your files at once! You are allowed to make corrections, because your last submit command overwrites any data previously submitted.
Barak Pearlmutter <bap@cs.unm.edu>