?

Log in

No account? Create an account

mctcstudents

Well...

next entry »
Jan. 28th, 2006 | 12:50 am
posted by: soullesshippy in mctcstudents

I'm throwing this together so that, if needed, my classmates and I can come together and ask each other questions about our Scheme homework for Ed Seifert's CSCI 1901 class.

Feel free to ask questions here, I'll try to get this address to everyone else (all 5) in our class so they can possibly benefit/contribute. I figure one hour in lab a week to ask each other questions may not be enough time as the assignments grow more complicated.

To respond to a comment here, click on "Leave a Comment". To post a new message, click on User Info on the left, and then the 2nd icon in the row of icons on the page that loads, it's a blue pencil and its mouse-over reads "Post".

Having a LiveJournal account is optional, you can post anonymously every time and just include your name in the post.

,Troy

Link | Leave a comment | Share

Comments {3}

(no subject)

from: anonymous
date: Feb. 2nd, 2006 05:16 pm (UTC)
Link

when writing recursive or iterative procedures,
is anyone else tempted to write the iterative first,
and then make a lame converted form of this for the
recursive? Like adding 0 to the result of the call
to self?... I'm trying to figure out of this is
"bad"... or just extremely efficient translation of code.
,Troy

Reply | Thread

(no subject)

from: anonymous
date: Feb. 15th, 2006 07:53 pm (UTC)
Link

I've found that it helps sometimes to do the iterative first. But, I think the real trick to the ones we have so far is the following:

(+ (the result using an operator) (the procedure -1 to one of the variables))

so for the 4*5 + 4*4 + 4*3... etc... you're always doing (* a b) each time, which is the result using the * operator.

So it's... (+ (* a b) (procedure (- a 1) b))

They all seem to follow the same formula. That's the way I look at it anyway.

Reply | Parent | Thread

(no subject)

from: anonymous
date: Feb. 15th, 2006 07:54 pm (UTC)
Link

I forgot to add that of course you're not always adding each value together. So (* a (procedure (- a 1)) might be the case instead.

Reply | Parent | Thread