Last active
April 14, 2016 13:57
-
-
Save theoremoon/76341aef8c8432d708b9cdf341f4270b to your computer and use it in GitHub Desktop.
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 FizzBuzz(n): | |
| if n == 0: | |
| return str(0) | |
| elif n % 15 == 0: | |
| return "FizzBuzz" | |
| elif n % 3 == 0: | |
| return "Fizz" | |
| elif n % 5 == 0: | |
| return "Buzz" | |
| return str(n) | |
| n = int(input()) | |
| print(" ".join([FizzBuzz(i) for i in range(n + 1)])) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment