Fizz Buzz in Python
Thursday, December 17th, 2009
Jeff Atwood of Coding Horror has developed a sure fire test to filter out good programmers from bad ones. It’s called the FizzBuzz test, and it’s a very simple problem to solve. Enjoy!
If you’d like to learn more about programming, contact me for a one-on-one lesson.
1 2 3 4 5 6 7 8 9 | for i in range(1,101): if not i % 15: print "FizzBuzz" elif not i % 3: print "Fizz" elif not i % 5: print "Buzz" else: print i |
[...] the original here: Fizz Buzz in Python // Kenneth Reitz By admin | category: python | tags: called-the-fizzbuzz, code, coding-horror, filter-out, [...]