do you fail at FizzBuzz? simple prog test
Terry Reedy
tjreedy at udel.edu
Mon May 12 18:11:48 EDT 2008
"Gabriel Genellina" <gagsl-py2 at yahoo.com.ar> wrote in message
news:op.ua04evz4x6zn5v at a98gizw.cpe.telecentro.net.ar...
En Sat, 10 May 2008 22:12:37 -0300, globalrev <skanemupp at yahoo.se>
escribió:
| (We used this question last year - some people gave a sensible answer
| in less | than 5 minutes, but others did not even know how to start)
Another approach I do not remember seeing here (under 10 minutes)
fb = ('FizzBuzz', None, None, 'Fizz', None, 'Buzz', 'Fizz',
None, None, 'Fizz', 'Buzz', None, 'Fizz', None, None)
for i in range(1,101): print(fb[i%15] or i) #3.0
More information about the Python-list
mailing list