Skip to content

Instantly share code, notes, and snippets.

@rlfrahm
Last active August 29, 2015 14:22
Show Gist options
  • Save rlfrahm/90c6ce08214d9d38518b to your computer and use it in GitHub Desktop.
Save rlfrahm/90c6ce08214d9d38518b to your computer and use it in GitHub Desktop.
A quick Python implementation of Fizzbuzz (http://en.wikipedia.org/wiki/Fizz_buzz)
#!/usr/bin/python
for i in range(0,100):
three = i % 3
five = i % 5
if three == 0 and five == 0:
print 'fizzbuzz'
elif three == 0:
print 'fizz'
elif five == 0:
print 'buzz'
else:
print i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment