title: Sum of all the multiples of 3 or 5 below 1000
body: <p>Beginner here- trying to make a simple python program that will compute/answer this problem:</p>
  
  <blockquote>
    <p>If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.<p>
    Find the sum of all the multiples of 3 or 5 below 1000.</p>
  </blockquote>
  
  <p>Currently this is what I have:</p>
  
  <pre><code>a = 0
  b = 0
  while a &lt; 1000:
      a = a + 3
      print (a)
  
  while b &lt; 1000
      b = b + 5
      print (b)
  </code></pre>
  
  <p>This will print all the numbers being considered. I just need to add them together and that's my answer. </p>
  
  <p>I would like one of two things to happen, instead of the code that I have written:</p>
  
  <ol>
  <li>I would like all of this to happen internally, and therefore not have to use the "print" function. The just print the sum of all of those multiples.</li>
  <li>I would like all of this stuff to print, but then I want to be able to print the sum of all of them too. Is there a way to make the computer take the value of everything it has printed?</li>
  </ol>