[racket] Newbie question

From: André Toscano (andretoscanocarmo at gmail.com)
Date: Wed Nov 10 15:30:57 EST 2010

Hi all!

I'm new to programming. I'm trying to learn on my own in my spare time, not a student in any school or course. Got hold of the HTDP book website when searching the web for resources, and am progressing through it at my own (usually slow) pace.

I'm kind of getting stuck on a specific exercise.

It's 5.1.3. in this url http://htdp.org/2003-09-26/Book/curriculum-Z-H-8.html

I did 5.1.2. already and it's working fine. Also, I have a pretty good idea of how to do 5.1.4. I'm just stuck at 5.1.3.

As it says in the problem formulation, "check-guess3 consumes three digits and a number.[...] The number is called 'target'[...]", and from what I can figure out, 'guess' is a number made up of the three digits that have to be inputed. So I believe 'target' is the random name that the computer will choose (like in exercise 5.1.2.) and to which 'guess' should be compared against.

And that's where I'm stuck. How can I "build" a number based on three inputed digits?

Should those 3 digits be three different arguments present in the function definition? 

; for example (define (check-guess3 digit1 digit2 digit3 target) ? 

I'm not expecting to get a direct answer in here. But if someone could be kind enough to just rephrase what's expected, that would probably be of help.



Posted on the users mailing list.