title: Assignment to gather upper limits and squared integers
body: <p>My assignment is:</p>
  <p>Please write a program which asks the user to type in an upper limit. The program then prints out numbers so that each subsequent number is the previous one doubled, starting from the number 1. That is, the program prints out powers of two in order.</p>
  <p>The execution of the program finishes when the next number to be printed would be greater than the limit set by the user. No numbers greater than the limit should be printed.</p>
  <p>Upper limit: 8
  1
  2
  4
  8</p>
  <p>This is what I've written</p>
  <pre><code>limit = int(input(&quot;Upper limit:&quot;))
  number = 0
  power = 0
  while power &lt; limit:
      number += 1
      power = number ** 2
      print(power)
  </code></pre>
  <p>It's almost correct, except it'll print one row too many. For instance, if I input 50, I'll get:</p>
  <p>1
  4
  9
  16
  25
  36
  49
  64</p>
  <p>I know it's because I put while power &lt; limit, but I'm not sure what to do about it.</p>
  <p>Edit: Also, I'm supposed to do this without the True conditional.</p>