On May 30, 6:27 pm, Matthew Moss <matthew.m... / gmail.com> wrote: > [Note: parts of this message were removed to make it a legal post.] > > Apologies for the latequiz... been rather busy today. Here's another simple > one, but practical. I didn't get specific about input > formats/parameters/etc, I leave that to you this week. > > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > > The three rules of RubyQuiz2: > > 1. Please do not post any solutions or spoiler discussion for thisquizuntil 48 hours have passed from the time on this message. > > 2. Support RubyQuiz2 by submitting ideas as often as you can! (A > permanent, new website is in the works for RubyQuiz2. Until then, > please visit the temporary website at > > <http://splatbang.com/rubyquiz/<http://matthew.moss.googlepages.com/home>>. > > 3. Enjoy! > > Suggestion: A [QUIZ] in the subject of emails about the problem > helps everyone on Ruby Talk follow the discussion. Please reply to > the originalquizmessage, if you can. > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > > ## Price Ranges > > _Quiz description by James Edward Gray II_ > > You have a list of price ranges from different vendors like: > > Company A: $1,000 - $3,000 > Company B: $6,000 - $10,000 > Company C: $500 - $2,500 > > Given such a list and the desired price range a shopper wishes to pay, > return the companies the shopper should examine. For example, if the > shopper's price range was: > > Low: $2,500 > High: $5,000 > > the companies returned would be: > > Company A > Company C > > The shopper should also be allowed to provide just a low or just a high > value instead of both, should they prefer to do so. You weren't looking for a user interface, were you? ;) http://pastie.textmate.org/207034 Chris