title: How to sum numbers from input?
body: <p>I am working on the following problem.</p>
  
  <p>Write a program that continually prompts for positive integers and stops when the sum of numbers entered exceeds 1000. 
  But my code stop early if a negative integer is entered.</p>
  
  <p>The numbers will not sum.</p>
  
  <p>My code:    </p>
  
  <pre><code>x = int(input("Enter an integer:"))
  total = 0
  sum = 0
  while (0 &lt;= x):
      if sum &lt;= 1000:
          x += 1
          sum += (int(input("Enter an integer:")))
      elif sum &gt;= 1000:
          break
  </code></pre>