SimplePrograms challenge

mensanator at aol.com mensanator at aol.com
Mon Jun 11 23:49:56 EDT 2007


On Jun 11, 4:56?pm, Steve Howell <showel... at yahoo.com> wrote:
> Hi, I'm offering a challenge to extend the following
> page by one good example:
>
> http://wiki.python.org/moin/SimplePrograms
>
> Right now the page starts off with 15 examples that
> cover lots of ground in Python, but they're still
> scratching the surface.  (There are also two Eight
> Queens implementations, but I'm looking to fill the
> gap in lines-of-code, and they're a little long now.)
>
> I'm looking for a good 16-line code example with the
> following qualities:
>
>   1) It introduces some important Python concept that
> the first 15 programs don't cover.
>
>   2) It's not too esoteric.  Python newbies are the
> audience (but you can assume they're not new to
> programming in general).
>
>   3) It runs on Python 2.4.
>
>   4) It doesn't just demonstrate a concept; it solves
> a problem at face value.  (It can solve a whimsical
> problem, like counting rabbits, but the program itself
> should be "complete" and "suitably simple" for the
> problem at hand.)
>
>   5) You're willing to have your code reviewed by the
> masses.
>
>   6) No major departures from PEP 8.
>
> Any takers?
>
> -- Steve
>
> ___________________________________________________________________________ _________
> Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.http://farechase.yahoo.com/

I just posted a 30-line generator function
on your site. Should I have posted it here
first? Also, why do you count comments and
blank lines instead of lines of executable
code? Are you trying to encourage obfuscation?




More information about the Python-list mailing list