[racket] Exercise 3.1 HTDP Help
I am a beginner to programming and where I know I have the most problems is
just trying to understand the math behind what I am trying to do.
For example I am working through the exercise 3.1.1 in HTDP. It states "make
up examples for each of the functions. Determine how many attendees can
afford a show at a ticket price of $3.00, $4.00, and $5.00. Use the examples
to formulate a general rule that shows how to compute the number of
attendees from the ticket price."
1st Question: Without the functions already defined how am I suppose to work
through examples?!?!
2nd Question: When it says "use the examples to formulate a general rule
that shows the how to compute the number of attendees from the ticket price"
I don't understand at all how to do this
3rd Question: I looked ahead and it defines the attendees function as (+ 120
(* (/15 .10)(-5.00 ticket-price) I understand the the 120 is the attendees
that can afford the $5 ticket price, the 15 is the additional attendees when
dropping the price and the .10 is the amount the price has been dropped. I
do not understand why I am dividing 15 by .10 or why I am subtracting the
standard price of $5 by the entered ticket-price and multiplying the two
together.
I am learning this on my own so I do not have a teacher to ask these
questions too, and I am not looking for any answers, I want to figure
everything on my own, I just need explanations to these questions because I
am honestly lost.
Jeremy D. Duenas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20110124/53b7faf4/attachment.html>