Created
November 20, 2019 09:20
-
-
Save notsobad/2229716c4f43b1cbde23a587e62909b4 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
for i in range(100): | |
n = i + 1 | |
out = [] | |
if n % 3 == 0: | |
out.append('fizz') | |
if n % 5 == 0: | |
out.append('buzz') | |
if not out: | |
out.append(str(n)) | |
print ','.join(out) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment