04-23-2006, 09:34 PM | #61 | |
Friendly Server Admin
Join Date: Sep 2003
Location: Marin County, CA
Posts: 4,087
|
Quote:
|
|
04-24-2006, 05:09 AM | #62 |
Banned User
Join Date: Nov 2004
Location: New Paltz...for now...
Posts: 6,177
|
Nevermind.
|
04-24-2006, 09:01 AM | #63 |
Homer of Kittens
Join Date: Aug 2004
Location: San Francisco, Bay Area
Posts: 4,374
|
Okay take this example. You have 3 numbers: X, Y and Z. (X, Y and Z can be any 3 numbers at random)
How would you go about finding which one is the smallest. Forget about programming for now, just use your common sense logic.
__________________
-------------------------------------------------- Games I am playing: Jeanne D'Ark (PSP) Firefox rules |
04-24-2006, 12:11 PM | #64 |
Banned User
Join Date: Nov 2004
Location: New Paltz...for now...
Posts: 6,177
|
Well...I would look at it...see which one is the smallest..and say yup, that's the smallest.
I think i'm missing your point? |
04-24-2006, 01:02 PM | #65 |
Dungeon Master
Join Date: Nov 2003
Location: Poland
Posts: 4,152
|
What SoccerDude meant is: how to find the smallest number if you can compare only two at the time? (because the "min" function gives you the smaller of two, not three)
So, suppose you have three rocks and a scale such as this one (doesn't show you the weight, only allows to compare two things). How would you proceed to find the lightest one?
__________________
What's happening? Wh... Where am I? |
04-24-2006, 01:28 PM | #66 | |
Homer of Kittens
Join Date: Aug 2004
Location: San Francisco, Bay Area
Posts: 4,374
|
Quote:
so to compare if X is smaller than Y, you would say if(X<Y). So let's go back to our small example. You have 3 numbers hidden from you X, Y and Z. They can contain any number. You can compare two of them at a time, using the if operator like the example above. How do you go about finding the minimum of the 3 numbers. You can only compare two of them together at one point, and their contents is unknown to you before you run the program.
__________________
-------------------------------------------------- Games I am playing: Jeanne D'Ark (PSP) Firefox rules |
|
04-24-2006, 01:32 PM | #67 |
Banned User
Join Date: Nov 2004
Location: New Paltz...for now...
Posts: 6,177
|
I dunno? Something like X<Y, X<Z, Y<Z?
|
04-24-2006, 01:42 PM | #68 | |
Homer of Kittens
Join Date: Aug 2004
Location: San Francisco, Bay Area
Posts: 4,374
|
Quote:
__________________
-------------------------------------------------- Games I am playing: Jeanne D'Ark (PSP) Firefox rules |
|
04-24-2006, 04:03 PM | #69 |
Kersal Massive
|
God.
|
04-24-2006, 04:06 PM | #70 | |
Beyond Belief
Join Date: Jan 2005
Location: Blighty
Posts: 2,186
|
Quote:
For example: x = 4 y = 5 z = 6 compare x, y // result x, compare it to the next compare x, z // result x, x is the smallest x = 5 y = 4 z = 6 compare x, y // result y compare y, z // result y x = 5 y = 6 z = 4 compare x, y // result x compare x, z // result z For just three you're looking at something like this, in pseudo code: if (x<y) result=x else result=y if (result>z) result=z any more variables and you should be thinking about loops, on the same principle, just keep passing the smallest number to the next in the list, comparing, then passing that along, the number at the end is the smallest.
__________________
Richard Dawkins :: AAI 07 :: NOVA ID on Trial :: Skeptic's Guide :: Beyond Belief :: Out Campaign :: NeuroLogica :: Skepticality Last edited by Aj_; 04-25-2006 at 04:41 AM. |
|
04-24-2006, 04:21 PM | #71 |
Homer of Kittens
Join Date: Aug 2004
Location: San Francisco, Bay Area
Posts: 4,374
|
That's what I was trying to get to. I wanted Saksquash to think about a little though
__________________
-------------------------------------------------- Games I am playing: Jeanne D'Ark (PSP) Firefox rules |
04-24-2006, 04:40 PM | #72 | |
Beyond Belief
Join Date: Jan 2005
Location: Blighty
Posts: 2,186
|
Quote:
__________________
Richard Dawkins :: AAI 07 :: NOVA ID on Trial :: Skeptic's Guide :: Beyond Belief :: Out Campaign :: NeuroLogica :: Skepticality |
|
04-24-2006, 05:48 PM | #73 |
Banned User
Join Date: Nov 2004
Location: New Paltz...for now...
Posts: 6,177
|
God, I hate math.
|
04-24-2006, 06:32 PM | #74 | |
Diva of Death
|
Quote:
Peace & Luv, Liz
__________________
Adventures in Roleplaying (Nov. 19): "Maybe it's still in the Elemental Plane of Candy." "Is the Elemental Plane of Candy anything like Willy Wonka's factory?" "If it is, would that mean Oompa Loompas are Candy Elementals?" "Actually, I'm thinking more like the Candyland board game. But, I like this idea better." "I like the idea of Oompa Loompa Elementals." |
|
04-24-2006, 06:49 PM | #75 |
Banned User
Join Date: Nov 2004
Location: New Paltz...for now...
Posts: 6,177
|
The course is web design...as in html...I didn't know i'd be doing java.
|
04-24-2006, 07:03 PM | #76 |
Diva of Death
|
So... somehow you never expected a web design course to consist of learning web technologies?
Peace & Luv, Liz
__________________
Adventures in Roleplaying (Nov. 19): "Maybe it's still in the Elemental Plane of Candy." "Is the Elemental Plane of Candy anything like Willy Wonka's factory?" "If it is, would that mean Oompa Loompas are Candy Elementals?" "Actually, I'm thinking more like the Candyland board game. But, I like this idea better." "I like the idea of Oompa Loompa Elementals." |
04-24-2006, 08:09 PM | #77 |
Banned User
Join Date: Nov 2004
Location: New Paltz...for now...
Posts: 6,177
|
Shut the **** up.
|
04-24-2006, 09:32 PM | #78 | |
Friendly Server Admin
Join Date: Sep 2003
Location: Marin County, CA
Posts: 4,087
|
Quote:
|
|
04-24-2006, 10:22 PM | #79 | |
Diva of Death
|
Quote:
Which is one reason why I never bothered getting serious about webmastering even though I enjoy it... trying to figure out most programming concepts (i.e. anything beyond HTML and CSS) gives me a headache. Peace & Luv, Liz
__________________
Adventures in Roleplaying (Nov. 19): "Maybe it's still in the Elemental Plane of Candy." "Is the Elemental Plane of Candy anything like Willy Wonka's factory?" "If it is, would that mean Oompa Loompas are Candy Elementals?" "Actually, I'm thinking more like the Candyland board game. But, I like this idea better." "I like the idea of Oompa Loompa Elementals." |
|