Scheme Exercises

back to exercise list       previous     next

Group:     Exercise: 17/48 

Three-part function (2):  A function with three different behaviors (using cond)

Create a function called "three-cond", whose signature is (three-cond w), that has the value -1 if w < 0, and has the value 3.5 if 0 <= w and w <= 4, and has the value 7 otherwise.