Skip to content

Instantly share code, notes, and snippets.

@KorbenC
Created September 29, 2013 08:50
Show Gist options
  • Save KorbenC/6750593 to your computer and use it in GitHub Desktop.
Save KorbenC/6750593 to your computer and use it in GitHub Desktop.
Classic FizzBuzz test
#!/usr/bin/env python
def fizzbuzz():
for x in xrange(1, 100):
if x % 5 == 0 and x % 3 == 0:
print "FizzBuzz"
elif x % 3 == 0:
print "Fizz"
elif x % 5 == 0:
print "Buzz"
else:
print x
def main():
fizzbuzz()
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment