-
-
Save fhereduardo90/a52bb59be24871e6ee15fcd1631c9721 to your computer and use it in GitHub Desktop.
1 exercise
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
def sum_multiples(num): | |
sum = 0 | |
for i in range(1, num): | |
if i % 3 == 0 or i % 5 == 0: | |
sum += i | |
else: | |
return sum | |
print(sum_multiples(1000)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment