[racket] typo in HtDP

From: Bloch Stephen (bloch at adelphi.edu)
Date: Tue Nov 29 18:55:12 EST 2011

On Nov 29, 2011, at 4:31 PM, David Van Horn wrote:

> On 11/29/11 4:28 PM, Jakub Hadam wrote:
>> Hello,
>> I claim there is a typo in the online version of HtDP:
>> Exercise 4.3.3, the first condition should be
>>
>> [(<=  n  1000) (*  .040  n)]
>>
>>
>>
>> instead of
>>
>> [(<=  n  1000) (*  .040  1000)]
>
> Why?  That's what's in the printed book too and it seems perfectly  
> reasonable to me.

Well, it's a "what is the value of this expression?" exercise, so  
technically it could have been anything.  However, to solve the  
intended problem of bank interest, Jakub is right: it should be (* . 
040 n) in the first case (otherwise people would earn the same $40  
interest on a deposit of a penny as on a deposit of $1000.)



Stephen Bloch
sbloch at adelphi.edu



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20111129/5fa41e65/attachment.html>

Posted on the users mailing list.