Created
July 25, 2022 13:25
-
-
Save overhacked/f3d7c2e68395a3e2f6ac6c4d246af00f to your computer and use it in GitHub Desktop.
Recurse Center Application CracklePop
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
#!/usr/bin/env python3 | |
def main(): | |
for n in range(1, 101): | |
maybe_crackle = "Crackle" if n % 3 == 0 else '' | |
maybe_pop = "Pop" if n % 5 == 0 else '' | |
if maybe_crackle or maybe_pop: | |
print(maybe_crackle, maybe_pop, sep='') | |
else: | |
print(n) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment