''int' object is not iterable: TypeError

I am a newbie and getting this error below. Please advise.

I want to sum all the positive integers(n>0) which are divisible by 3 and 5 without repetition

See my code below:


n=100
from collections import OrderedDict

for i in range (-n, n):
  if (i % 3 == 0) or (i % 5 == 0):
    print(i)
  elif (i % 3 == 0) and (i % 5 ==0):
    print(i)
  elif i < 0:
    pass
sum(i)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source