Created
September 18, 2013 09:48
-
-
Save AyatoKinkori/6606908 to your computer and use it in GitHub Desktop.
This file contains 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 fizz_check(num): | |
return "fizz" if num % 3 == 0 else "" | |
def buzz_check(num): | |
return "buzz" if num % 5 == 0 else "" | |
def fizz_buzz(num): | |
return [(fizz_check(n) + buzz_check(n)) or n for n in range(1, num + 1)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment