Created
May 5, 2022 22:38
-
-
Save staccDOTsol/83ff0f8b5be942d26802a67539b5ad46 to your computer and use it in GitHub Desktop.
mmm modulus
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
#!/usr/bin/python3 | |
for i in range(1,51): # iterates int 1 through 50 | |
if i % 3 == 0: # test if divisible by 3 | |
if i % 7 == 0: # test if divisible by 7 | |
print('#{}\t'.format(i) + str(i % 7 == 0 and i % 3 == 0) + '\t CloudComputing') # if divisible by 3 & 7, prints iteration, arg response, and 'Computing' | |
else: | |
print('#{}\t'.format(i) + str(i % 7 == 0) + '\t Computing') # prints iteration, arg response, and 'Computing' | |
elif i % 7 == 0: # test if divisible by 7 | |
print('#{}\t'.format(i) + str(i % 7 == 0 and i % 3 == 0) + '\t Cloud') | |
else: | |
print('#{}\t\t\t\tFUCK'.format(i)) | |
else: | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment