PythonChallenge - an Amusing Way to Explore Python
thesamet writes "The Python Challenge is a
set of riddles that require a little bit of
Python programming to be solved. The purpose of the riddles is to
provide an entertaining way to explore the Python programming language.
The challenge was started late in April this year and it is starting to gain
popularity in the Python community. What people love most about the
challenge is that it makes them poke in Python's module library and
discover new things. It truly demonstrates the great power of Python's included 'batteries.'
The riddles are designed to be solvable by Python beginners, but yet
are challenging even to experienced Python programmers. The first
few riddles are very easy, but it gradually becomes more and more
challenging. Many people reported that playing the challenge is highly
addictive and it is great fun.
The site also features discussion forums where users can ask for hints.
Additionally, after solving a riddle, its solution is available in a
wiki form."
Let's watch that counter fly...
but where's the perl version?
python is ugly and unreadable.
Could it be?
I suppose so.
Many people reported that playing the challenge is highly addictive and it is great fun.
:)
It's even more addictive and fun to express solutions as perl one-liners.
i'd have more respect for the authors had they not shamelessly ripped off the notpron site and declined to credit anyone with the idea.
yay python!
If you're interested in exploring Ruby in a similar way check out RubyQuiz.
arcade@linux:~> cat equality.html | perl -e '{ 3}[[:lower:]]/) { print ; } }
k ND xKMcKanMNLNVrYociOBCVoqQPgsrpT
while () { if ($_ =~ m/[::lower::][[:upper:]]{3}[[:lower:]][[:upper:]]
'
with a diamon inside the while() thing, but that get's filtered out - and I don't know html enough. It gives the following output:
cZoExqHxUzeOEKiVEYjRkeiQyLXLRUAiPPviwCyNaOzenFI
Okay, now, OEKiVEY seems to be the string they're looking for, but neither 'i', 'OEKiVEY', 'oekivey', 'oekvey' or anything else I can think of let's me go anywhere.
I'm stumped.
Each riddle must be solved with oneliner in Perl.
And credit where credit is due. I admit seeing this suggestion (IIRC) on Lambda the Ultimate.
Software should be free as in speech, but if we also get some free beer, all the better.
I could write a program to sit there and match the pattern and keep applying it as part of the URL, but I'm not willing to write that sort of program in *any* language.
The author(s) of this challenge should be taken into the streets and flogged with wet noodles. Sorry, but I do not find it acceptable to require someone to write a program to query a dynamic URL to find the "answer" to a problem. The hint says it shouldn't take more than about 300 iterations, but I'm not willing to trust it.
Cross out the "Python" above. There is no need to use Python to solve these puzzles. I use Haskell. Some other language might work for someone else. There is nothing Python specific about the challenges. But they are indeed quite amusing.