Re: [racket] novice question about expressions

2013-01-12 Thread Jos Koot
Cc: users@racket-lang.org Subject: Re: [racket] novice question about expressions (/ (+ (* n 2) 300) (* 13 n)) On Fri, Jan 11, 2013 at 8:08 PM, Jamel Hamani wrote: (n*2+ 300) / (13n) -- Grant Rettke | ACM, AMA, COG, IEEE gret...@acm.org | http://www.wisdomandwonder.com/ Wisdom begins

Re: [racket] novice question about expressions

2013-01-12 Thread Stephen Bloch
On Jan 11, 2013, at 9:08 PM, Jamel Hamani wrote: > how do I formulate this expression in racket? > > (n*2+ 300) / (13n) > > I got the first part done > > (define (f n) > ( + ( * n n ) 300)) That already looks odd. When you write "n*2", do you mean n times 2, or n raised to the power of 2

Re: [racket] novice question about expressions

2013-01-12 Thread Grant Rettke
(/ (+ (* n 2) 300) (* 13 n)) On Fri, Jan 11, 2013 at 8:08 PM, Jamel Hamani wrote: > (n*2+ 300) / (13n) -- Grant Rettke | ACM, AMA, COG, IEEE gret...@acm.org | http://www.wisdomandwonder.com/ Wisdom begins in wonder. ((λ (x) (x x)) (λ (x) (x x))) Racket Users list:

[racket] novice question about expressions

2013-01-12 Thread Jamel Hamani
how do I formulate this expression in racket? (n*2+ 300) / (13n) I got the first part done (define (f n) ( + ( * n n ) 300)) So lets say I pick 5. (f 5) would give me 325. But how would I do the second part- dividing it by (13n)? Racket Users list: http://lists.racke