Skip to content

Instantly share code, notes, and snippets.

@codeperfectplus
Created August 29, 2023 09:33
Show Gist options
  • Select an option

  • Save codeperfectplus/cab4710130fa0c152600b1262401d8e0 to your computer and use it in GitHub Desktop.

Select an option

Save codeperfectplus/cab4710130fa0c152600b1262401d8e0 to your computer and use it in GitHub Desktop.
def multiples(n):
sum = 0
for i in range(n):
if(i%3==0) or (i%5==0):
sum += i
return sum
print(multiples(1000))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment