[plt-scheme] HtDP > Chapter 2 > Exercise 2.3.3.
On Jun 26, 2008, at 3:30 PM, Mr. Watson wrote:
> Hello,
>
> The problem says,
>
> "An old-style movie theater has a simple profit function. Each
> customer pays $5 per ticket. Every performance costs the theater $20,
> plus $.50 per attendee. Develop the function total-profit. It consumes
> the number of attendees (of a show) and produces how much income the
> attendees produce."
>
> I understand the problem but I cannot get it to work (not calculate
> correctly) in DrScheme.
>
> Here is my working progress:
>
> (define(total-profit attendee)
> (- 0
> (- 20 0
> (* 0.5 attendee)
> (+ 0
> (* 5 attendee)))))
Your work in progress doesn't seem to include the early steps of the
design recipe, most notably the examples. What are your examples?
All the best,
John Clements
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2484 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20080626/556b2b43/attachment.p7s>