Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

sum of multiples of 3 or 5 python

total = []

for num in range(0,1001):
    if (num % 3 == 0) or (num % 5 == 0):
        total.append(num)
        
print(sum(total))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sum #multiples #python
ADD COMMENT
Topic
Name
4+3 =