title: Trying to make a month in a Calendar only used Nested Loops
body: <p>This is my code:</p>
  <pre><code>x = 8
  
  while x &lt;= 31:
      j = 1
      while j &lt;= 7:
          print(j, &quot;\t&quot;, end=' ')
          j += 1
      print(&quot;\n&quot;)
      print(x, &quot;\t&quot;, end=' ')
      x += 7
  </code></pre>
  <p>The outcome is supposed to be where the month starts on a Sunday, starting from 1 - 31.</p>
  <p>So far, this is the outcome of the code I have:</p>
  <p>Sun      Mon     Tue     Wed     Thu     Fri     Sat</p>
  <p>1         2       3       4       5       6      7</p>
  <p>8         1       2       3       4       5       6       7</p>
  <p>15        1       2       3       4       5       6       7</p>
  <p>22        1       2       3       4       5       6       7</p>
  <p>29</p>
  <p>I can't figure out how to get the second line to continue with 9-14 and so on.</p>