DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
find the sum of all the multiples of 3 or 5 below 1000 python
nums = [3, 5] result = 0 for i in range(0,1000): if i%3 == 0 or i%5 == 0: result += i print(result)
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#find
#sum
#multiples
#python
ADD COMMENT
Topic
COMMENT
Name
1+3 =
Submit