Skip to content

Instantly share code, notes, and snippets.

@teenst
Created January 17, 2012 16:51
Show Gist options
  • Save teenst/1627456 to your computer and use it in GitHub Desktop.
Save teenst/1627456 to your computer and use it in GitHub Desktop.
FizzBuzz by python
#!/usr/bin/env python
# http://www.aoky.net/articles/jeff_atwood/why_cant_programmers_program.htm
for i in xrange(1,101):
if i % 3 == 0 and i % 5 == 0:
print 'FizzBuzz'
elif i%3 == 0:
print 'Fizz'
elif i % 5 == 0:
print 'Buzz'
else:
print i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment