Is there a companion book that goes with the book "Scheme And The Art of Programming" by George Springer and Daniel P. Friedman?
While it is a good book from which to learn Scheme programming, it does not have the complete answers to the practice problems. That makes learning difficult, because there is no reliable way to double-check to see if you have the correct responses to its assignments. My interrupter (DrRacket) does not always give me good feed-back. It either just give the expression's value, or it gives an error message.
It would be nice to have a companion book that explains 'how' to get the correct answers. As an example, in the following problem where we must Write the scheme expression that denotes the same calculations as the following arithmetic expression:
5 x ((537 x (98.3 + (375 - (2.5 x 153)))) + 255)
My thinking went as follows:
(code)
(* 5 ((* 537 (+ 98.3 (- 375 (* 2.5 153)))) + 255) rewritten as
[/code]
Step 1 = Evaluating within the [] gives
[/b] (* 5 ((* 537 (+ 98.3 (- 375 [b][(* 2.5 153)][/b] ))) + 255) rewritten as (* 5 ((* 537 (+ 98.3 (- 375 382.5))) + 255) rewritten as [b]
Step 2 = Evaluating within the [] gives
[/b] (* 5 ((* 537 (+ 98.3 [b][(- 375 382.5)][/b] )) + 255) rewritten as (* 5 ((* 537 (+ 98.3 -7.5)) + 255) rewritten as [b]
Step 3 = Evaluating within the [] gives
[/b] (* 5 ((* 537 [b][(+ 98.3 -7.5)][/b] ) + 255) rewritten as (* 5 ((* 537 (+ 98.3 90.8)) + 255) rewritten as [b]
Step 4 = Evaluating within the [] gives
[/b] (* 5 ((* 537 [b][(+ 98.3 90.8)][/b] ) + 255) rewritten as [b]
Step 5 = Evaluating within the [] gives
[/b] (* 5 ( [b][(* 537 189.1)][/b] + 255) rewritten as [b]
Step 6 = Evaluating within the [] gives
[/b] (* 5 [b][(+ 101546.7 255)][/b] rewritten as [b]
Step 7 = Evaluating within the [] gives
[/b] [b][(* 5 101801.7)][/b] answer----> 101801.7 [b]
Even after all this work, without really good feed-back I do not know if this is the correct answer....therry

New Topic/Question
Reply


MultiQuote



|