Created
January 17, 2025 18:37
-
-
Save Programmer-RD-AI/789df6a65cb5875b80155b97e0e7cc25 to your computer and use it in GitHub Desktop.
Program that prints out the numbers 1 to 100 (inclusive). If the number is divisible by 3, print Crackle instead of the number. If it's divisible by 5, print Pop. If it's divisible by both 3 and 5, print CracklePop.
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
for num in range(1, 101): | |
if num % 3 == 0 and num % 5 == 0: | |
print("CracklePop") | |
elif num % 5 == 0: | |
print("Pop") | |
elif num % 3 == 0: | |
print("Crackle") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment