Skip to content

Instantly share code, notes, and snippets.

@igniteflow
Created December 13, 2011 10:06
Show Gist options
  • Select an option

  • Save igniteflow/1471507 to your computer and use it in GitHub Desktop.

Select an option

Save igniteflow/1471507 to your computer and use it in GitHub Desktop.
Python: Fizz buzz
num = range(1,101)
for n in num:
if n % 15 == 0:
print 'FizzBuzz'
elif n % 5 == 0:
print 'Buzz'
elif n % 3 == 0:
print 'Fizz'
else:
print n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment