I'm attempting to get my feet wet with python on Project Euler, but I'm having an issue with the first problem (find the sum of the multiples of 3 or 5 up to 1,000). I can successfully print out multiples of three and five, but when I attempt to include the sum function I get the following error:
TypeError: 'int' object is not iterable
Any help would be appreciated.
n = 100
p = 0
while p<n:
p = p + 1
x = range(0, p)
# check to see if numbers are divisable by 3 or 5
def numcheck(x):
for numbers in x:
if numbers%3==0 and numbers%5==0:
sum(numbers)
numcheck(x)