[racket] exercise problem

From: Roelof Wobben (r.wobben at home.nl)
Date: Tue Feb 21 15:18:32 EST 2012

Op 21-2-2012 20:51, Stephen Bloch schreef:
> On Feb 21, 2012, at 2:43 PM, Roelof Wobben wrote:
>> But now I get this error message :
>> unsaved editor>:27:23: function call: expected a function after the open parenthesis, but found a part in: (tarief1 amount)
>> When I do (tarief 1 amount) instead of ((tarief amount))
> Yes, that's where the syntax error is.  So you've fixed that.

I fixed that?  I always thought that if I use another function that I 
must be into ().
So In my opinion one () for the then part and one () for the function call.

>> I don't get the error message but the outcome of (payback 2600) is not right.
> Several questions:
> 1) Have you written a complete set of test cases, with right answers, using "check-expect"?  Since there are four categories of input for this problem, you need at least four test cases, and you should probably have three more for the boundaries, a total of seven test cases.

Nope, check-expect is not explained on chapter section 3 of the book how 
to design programms. So I did not use that function.  I can make 
test-cases but then in this form

(= (/tarief 495/) 1,2375)

2) Which of these test cases produced wrong answers, and which (if any) 
produced right answers? You can use the pattern of right and wrong 
answers to track down where the problem is.

See answer1

3) Have you used the Stepper to watch what your program is doing?

Yes, when I do (payback 2600) on the prompt and press Step I only see a 
message  All definitions have been sucessfully evaluated and not other 
outcome so that did not help me any further.

Stephen Bloch sbloch at adelphi.edu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120221/2a03755e/attachment.html>

Posted on the users mailing list.