# [racket] Newbie question

 From: Jens Axel Søgaard (jensaxel at soegaard.net) Date: Wed Nov 10 16:29:51 EST 2010 Previous message: [racket] Newbie question Next message: [racket] Newbie question Messages sorted by: [date] [thread] [subject] [author]

```> 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?

Start smaller and simpler.

Write the function   three-digits->number : number number number -> number

The following are examples of how it should work:

(three-digits->number 1 2 3)    gives    123
(three-digits->number 5 1 4)    gives    514

If inputs are named a, b and c then

(three-digits->number a b c)   gives the number,
that has a as first digit, b as second digit and
c the last (and thus least signigicant) digit.

--
Jens Axel Søgaard

```

 Posted on the users mailing list. Previous message: [racket] Newbie question Next message: [racket] Newbie question Messages sorted by: [date] [thread] [subject] [author]