title: Using a nested for loop in python to print a rectangle
body: <p>I saw my same question asked but I want to know why what I'm trying isn't working.  This is from a Zybook challenge question.</p>
  
  <p>Here is the exercise:</p>
  
  <p>Write nested loops to print a rectangle. Sample output for given program:</p>
  
  <pre><code>* * *  
  * * *
  </code></pre>
  
  <p>This is the code I built:</p>
  
  <pre><code>num_rows = 2
  num_cols = 3
  
  for num_rows in range(0,num_rows):
      for num_cols in range(0,num_cols):
          print('*', end=' ')
      print('')
  </code></pre>
  
  <p>The output is: </p>
  
  <pre><code>* * *
  * * 
  </code></pre>
  
  <p>Question:  Why doesn't the nested for loop print statement iterate for the third time?  When I set the nested loop to: </p>
  
  <pre><code>for num_cols in range(0,3):  
  </code></pre>
  
  <p>I receive my desired output of the 3x2 asterisk rectangle.  If the num_cols variable is declared as 3, shouldn't the output statement equal my desired output?  </p>