title: Python how to check if number exceed limit in a while loop
body: <p>i am doing a program where i enter a number in a while loop and display an error if the sum of the  numbers exceed 100.</p>
  
  <p>here's my code</p>
  
  <pre><code>i = 0
  while i &lt; 2:
      numbers = float(input('Enter number: '))
      numbers += numbers
      print(numbers)
      limit = 101
      i += 1
      if numbers &gt;= limit:
          print("Over 100")
      else:
          print("Working")
  </code></pre>
  
  <p>The output is</p>
  
  <pre><code>Enter number: 30.9
  61.8
  Working
  Enter number: 61.9
  123.8
  Over 100
  </code></pre>
  
  <p>The number is 61.8 . it added 30.9 + 30.9 immediately and i know is the numbers += numbers does that calculation. Is there a way to do the math properly?</p>