Assignment 0: Finger Exercises



Before you tackle the homework, remind yourself of our General Advice, Advice on Homeworks, and Grading Guidelines. Above all, keep your work neat and honest.


  1. Convert each of the following expressions into Scheme:

    1. 4 + 6 + 7

    2. 5 * (5 + 9)

    3. (4 + 9) * (8 - 7)

    4. ((a * a) + (b * b)) / 2

  2. Convert the following function definitions into Scheme:

    1. square(x) = x * x

    2. avg(x, y) = (x + y) / 2

    3. celc->fahr(deg) = 9/5 * deg + 32

  3. Evaluate each of the following expressions. Show every step. For example:
      (sqrt (+ (* 3 3) (* 4 4)))
    = (sqrt (+ 9 (* 4 4)))
    = (sqrt (+ 9 16))
    = (sqrt 25)
    = 5
    

    1. (- (* 3 5) 20)

    2. (/ 44 (+ 8 3))

    3. (sqrt (square 6))

    4. (avg 6 10)

    5. (celc->fahr 100)




Kathi Fisler This page was generated on Fri Aug 27 17:01:35 CDT 1999.