Skip to content

Instantly share code, notes, and snippets.

@ikedumancas
Created June 18, 2018 05:54
Show Gist options
  • Select an option

  • Save ikedumancas/b4360fd5d9225555684c1619b633c64e to your computer and use it in GitHub Desktop.

Select an option

Save ikedumancas/b4360fd5d9225555684c1619b633c64e to your computer and use it in GitHub Desktop.
Python: FizzBuzz
def getFizzBuzz(fizz, buzz, start=1, end=100, step=1):
for i in range(start, end+1, step):
say = ''
if i % fizz == 0:
say += 'Fizz'
if i % buzz == 0:
say += 'Buzz'
if say == '':
say = i
print(say)
getFizzBuzz(fizz=3, buzz=5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment