Created
October 24, 2010 16:13
-
-
Save takinbo/643641 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FizzBuzz | |
# ---------------------------------------------------------------------------- | |
# in response to Pascal Ehigie Aito's blog post | |
# http://aitoehigie.wordpress.com/2010/10/24/most-programmers-cant-solve-this/ | |
# here's an attempt to solve it | |
for i in range(1, 101): | |
if not (i % 3 or i % 5): | |
print "FizzBuzz" | |
elif not i % 3: | |
print "Fizz" | |
elif not i % 5: | |
print "Buzz" | |
else: | |
print i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment