#Find the sum of all numbers which are divisible by #3 and 5 that are less than 1000 #initialize total to 0 sumOfNumbers = 0 #a simple for loop that goes from 1 to 999 for i in range(1,1000): #if i mod 3 is 0, add to sum of numbers if i % 3 == 0: sumOfNumbers += i #else if i mod 5 is 0, then add to sum of numbers elif i % 5 == 0: sumOfNumbers += i #print sum of numbers, which is the final answer print sumOfNumbers