CSC 160 Spring 2006 - Homework 5
Assigned March 7, due SUNDAY March 12


Read Chapter 2 of the online textbook.

The assignment may be done alone or in pairs. (You cannot pair up with the same person more than once during the semester.)


Part One [10 points]
1. Do exercise 2.1.2 in the Interactions Window.

Save this file as "hw5q1-[LastName]".


Part Two [60 points]
For questions 2-4, define a Scheme function in the Definitions Window. Then test each function three times in the Interactions Window.

2. Do exercise 2.2.3.

3. Do exercise 2.2.2.

4. Write a Scheme function called dollar->euro2 that takes in two parameters: a number of dollars and a current conversion rate. It returns the euro equivalent.

Save these files as "hw5def-[LastName]" and "hw5int-[LastName]".


Part III [30 points]
5. Do exercises 2.4.1 and 2.4.3. For each part of each exercise, write a sentence or two (commented out with semicolons) describing what lead to getting that error message.

Save these files as "hw5errordef-[LastName]" and "hw5errorint-[LastName]"



Last Modified: 3/7/06