I am going through challanges in python and cant see why i'm not getting the correct answer... The challange is 'Find the sum of all the multiples of 3 or 5 below 1000.'
Here is my code:
#!/usr/local/bin/python2.7 a = 0 b = 0 eA =  eA2 =  while (a < 997): # for 3 a += 3 eA.append(a) while (b < 995): # for 5 b += 5 eA2.append(b) print(eA + eA2)
The sum of the numbers outputted is not correct and I can't see why.