Gabriel Genellina wrote:
> En Sun, 15 Apr 2007 10:46:54 -0300, Army1987 <[EMAIL PROTECTED]> escribió:
> 
>> "Paddy" <[EMAIL PROTECTED]> ha scritto nel messaggio
>> news:[EMAIL PROTECTED]
>>
>>> On a different tack, from:
>>> http://tickletux.wordpress.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/
>>>  
>>>
>>> It seems you need to learn how to write a Fizz-Buzz
>>> program to get a job now-a-days :-)
>>
>> Something less idiotic? I took longer to type a program to do that 
>> than to
>> figure out how to do that.
> 
> We've used it as part of a test a few weeks ago. You'd be surprised on 
> how many guys couldn't write anything remotely sensible.
> 
> --Gabriel Genellina

py> for i in xrange(1,101):
...   if not i % 15:
...     print 'fizzbuzz'
...     continue
...   if not i % 5:
...     print 'buzz'
...     continue
...   if not i % 3:
...     print 'fizz'
...   else:
...     print i
...

I typed this without so much as hitting delete. Didn't time it but I'm 
guessing less than 2 minutes. How much am I worth a year? (Hopefully 
capitalization is not important for this exercise.)

James
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to