Weekly Ruby Quiz
Author |
Message |
Aziz
|
Posted: Thu May 22, 2008 1:47 pm Post subject: Weekly Ruby Quiz |
|
|
Ever heard of the Ruby Quiz (site is outdated, I think it's only on mailing list now)?
I've been reading "Best of Ruby Quiz" book a little bit. The Ruby Quiz is a weekly thing were a problem is posted and you try to solve it elegantly using Ruby. Well, since I've been learning Python recently, and don't know much about Ruby, I decided to try some in Python.
The problems are just simple word/logic problems, so you can do them in any language. I did the first one in the book - Madlibs. Its also available online at http://rubyquiz.com/quiz28.html, and was pretty fun. It's a fun way to learn and get comfortable with a language.
So here's an idea. I'll post a new Quiz every week, taken from that site (I'll just link it). You can discuss in the topic, but no solutions for at least 48 hours from the time of posting. You can do it in any language. I'm using Python. Either use the as a chance to learn a new language, or practice a language you already know. The solutions are available at the Ruby Quiz site, but the originally Quizes weren't yet solved, and the point of them is to do it without looking at spoilers. It's actually much more fun. So the first one will be mad libs. I've posted a my compiled script and 3 test files.
One more thing: the two test scripts have line breaks in them. Some of the line breaks are within an 'identifier'. Deal with it accordingly (don't change the text file).
Will the mods endorse this?
Also, of similar interest: www.pythonchallenge.com.
Usage for my script
code: | python madlibs.pyc [filename] |
filename is a the madlib text file. If no filename is specified, it uses the default mad lib:
"Our favorite language is ((gem:a gemstone)). We think ((gem)) is better than ((a gemstone)), and way better than ((a gemstone)). Yes, ((gem)) is the best!!!"
Description: |
|
Download |
Filename: |
madlibs.zip |
Filesize: |
2.14 KB |
Downloaded: |
164 Time(s) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Aziz
|
Posted: Sat May 24, 2008 11:36 pm Post subject: RE:Weekly Ruby Quiz |
|
|
No one's posted . There are 3 downloads and 40 views though, and I know only 1 download is me and probably only 3-4 views, so maybe someone is interested!
Anyways, I suppose the 48 hours are up, post your solutions. I'll post mine Monday when I'm at work, seeing as how I forgot to bring the source code home with me
|
|
|
|
|
|
|
|