Skip to content

Instantly share code, notes, and snippets.

@s-ben
Created July 29, 2015 01:48
Show Gist options
  • Save s-ben/0ab14719ffe7af876ea1 to your computer and use it in GitHub Desktop.
Save s-ben/0ab14719ffe7af876ea1 to your computer and use it in GitHub Desktop.
import sys
if len(sys.argv)>1:
count_to = int(sys.argv[1])
else:
count_to = int(raw_input("how many, yo?"))
for num in range(1,count_to):
if (num % 3 == 0) and (num % 5 == 0):
print 'fizzbuzz'
else:
if (num % 3 == 0):
print 'fizz'
elif (num % 5 == 0):
print 'buzz'
else:
print num
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment