Created
June 18, 2018 05:54
-
-
Save ikedumancas/b4360fd5d9225555684c1619b633c64e to your computer and use it in GitHub Desktop.
Python: FizzBuzz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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