[plt-scheme] Help: Uber newb

From: William Stanley (cpt_silverfox at hotmail.com)
Date: Tue Jan 8 23:18:00 EST 2008

aha! thanks that did it.... I understand what they wanted now...

 

Travis Stanley


Date: Tue, 8 Jan 2008 23:13:38 -0500
From: toddobryan at gmail.com
To: cpt_silverfox at hotmail.com
Subject: Re: [plt-scheme] Help: Uber newb
CC: plt-scheme at list.cs.brown.edu

Oh...it's not largest to smallest. You're supposed to create a 3-digit number in the reverse order. (convert3 5 4 2) should give you the number 245. Most significant means that the 2 is worth 2 hundreds, whereas the 5 is only worth 5 ones.


And I actually think the algebra hint is a bit of a red herring, although it does give you a clue that the solution is arithmetic.

Todd

On Jan 8, 2008 11:09 PM, William Stanley <
cpt_silverfox at hotmail.com> wrote:








Sorry, I should have clarified this exercise is 2.2.4 from www.htdp.org

I
have had no trouble with previous or later exercises and as I am trying
to muddle my way through the text on my lonesome I have no way to
easily check my work other then the "yup that works" method... and
saddly I have no knowledge of an algebra function that does what this
exercise asks... take 3 numbers and spit it out in order of largest to
smallest ie 1 2 3 = 321  (hell the only reason I know algebra is the
place to look is cause of that darned hint: "Use an algebra book to
find out how such a conversion works."

Thanks for the quick replies btw... 

 

Travis Stanley

> From: clements at brinckerhoff.org
> Subject: Re: [plt-scheme] Help: Uber newb
> Date: Tue, 8 Jan 2008 19:23:36 -0800

> To: cpt_silverfox at hotmail.com
> CC: plt-scheme at list.cs.brown.edu

> 
> 
> On Jan 8, 2008, at 7:08 PM, William Stanley wrote:
> 
> > Exercise 2.2.4.   Define the program convert3. It consumes three  
> > digits, starting with the least significant digit, followed by the  

> > next most significant one, and so on. The program produces the  
> > corresponding number. For example, the expected value of
> > (convert3 1 2 3)
> > is 321. Use an algebra book to find out how such a conversion works.

> >
> >
> > Okay I had gone past this exercise but as I couldn't figure it out  
> > it was bugging me... and I must say its been a while since I  
> > regularly used algebra but after racking my brain for a while and  

> > googling for even longer I throw myself at your mercy... I am sure  
> > it is rather simple but I am stumped... sometimes I wish I could  
> > peek at those answers... even just to see if I got it right.

> >
> >
> > Travis Stanley
> 
> 
> I hate to be the design-recipe-bot, but... have you tried following  
> the design recipe?  What are the examples you came up with?  Are  

> there simple examples that you know how to do?
> 
> John Clements
> 

Books, DVD's, gadgets, music and more. 
Shop online with Sympatico / MSN Shopping today!

_________________________________________________
  For list-related administrative tasks:
  http://list.cs.brown.edu/mailman/listinfo/plt-scheme





_________________________________________________________________
Read what Santa`s been up to! For all the latest, visit asksantaclaus.spaces.live.com!
http://asksantaclaus.spaces.live.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20080108/ff5694b3/attachment.html>

Posted on the users mailing list.