title: Python: All powers of 2 from the power of 0 to 16
body: <p>I'm trying to program in Python so that I can print the results of 2 to the power of every number from 0 to 16. I have code below so far, but it can only print the result of 2 to the power 16 and nothing before it. How do I print the other answers with it?</p>
  
  <hr>
  
  <pre><code>n = 2
  exponent = 16
  
  while exponent &lt; 16+1:
    n = n ** exponent
    exponent = exponent + 1
    print (n)
  </code></pre>