Skip to content

Instantly share code, notes, and snippets.

@MishoG
Created November 22, 2014 09:15
Show Gist options
  • Save MishoG/18350cf943998d45629a to your computer and use it in GitHub Desktop.
Save MishoG/18350cf943998d45629a to your computer and use it in GitHub Desktop.
Find the sum of all the multiples of 3 or 5 below 1000.
#Find the sum of all the multiples of 3 or 5 below 1000.
number = sum([num for num in range(1000) if num%3 == 0 or num%5 == 0])
print number
raw_input('enter')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment