title: Take two numbers as input, a width and height. Create a square where there are WIDTH numbers on each line, and HEIGHT rows
body: <p>This is the code that I have so far. My out put needs to look similar to:</p>
  
  <pre><code>Please enter the width: 5
  
  Please enter the height: 2
  
  1 2 3 4 5
  
  6 7 8 9 10
  </code></pre>
  
  <p>or another example would be</p>
  
  <pre><code>Please enter the width: 2
  
  Please enter the height: 3
  
  1 2 
  
  3 4
  
  5 6
  </code></pre>
  
  <p></p>
  
  <pre><code>def main():
  
      # variables width and height
      width  = 0
      height = 0
  
      # Takes input from user for variables
      width  = int( input( "Please enter the width: " ) )
      height = int( input( "Please enter the height: " ) )
  
      i = 0
      while i &lt; height:
          for x in range( 1, ( width * height ) + 1 ):
              print( x, "", end = "" )
  
  main()
  </code></pre>
  
  <p>Currently my code prints out everything in a single line. </p>
  
  <p>I can't figure out how to have the line keep printing numbers until it reaches the width, drop down a new line and continue until the height is reached also.</p>