Skip to content

Instantly share code, notes, and snippets.

@IanCarrasco
Created August 1, 2017 01:07
Show Gist options
  • Save IanCarrasco/e18ba6f3353d10adc66d079f131cc38e to your computer and use it in GitHub Desktop.
Save IanCarrasco/e18ba6f3353d10adc66d079f131cc38e to your computer and use it in GitHub Desktop.
Fizzbuzz Python Implementation
def fizzBuzz(amt):
for i in xrange(1,amt):
if i % 3 == 0 and i % 5 == 0:
print "fizzbuzz"
elif i % 3 is 0:
print "fizz"
elif i % 5 is 0:
print "buzz"
else:
print i
fizzBuzz(100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment