do you fail at FizzBuzz? simple prog test
miller.paul.w at gmail.com
miller.paul.w at gmail.com
Wed May 14 01:21:12 EDT 2008
On May 12, 3:55 am, bock... at virgilio.it wrote:
> As a test, I would leave out the last sentence, and see how many
> people (and how fast) figure out than a number can be multiple of
> three _and_ five and that the requirement is somehow incomplete ...
Actually, if you leave off the last sentence, what the program should
do when it encounters a multiple of 15 is print "Fizz" and print
"Buzz", in some order, because all multiples of 15 are multiples of 3
and 5. The only difference is, if you don't specify to print
"FizzBuzz" for a multiple of 15, it's perfectly legal to print
"BuzzFizz". :-)
On the other hand, asking for clarification regarding multiples of 15
at least shows the applicant is thinking.
More information about the Python-list
mailing list