title: Python multiplication table with while loops only
body: <p>my task is to create a multiplication table looking like <a href="http://gyazo.com/acf54336fe14033ffe536f74e42fffb0" rel="nofollow">this</a> where the user is asked to put in two numbers between 1 and 9. (in the picture the user put in "rows=3" "col=5").</p>
  
  <p>I can't get my top row right, is it a way to make my code better?
  "better" I mean like make the whole thing with only 2 while loops?</p>
  
  <p>EDIT: I forgot to mention ONLY with WHILE loops, not with "for".</p>
  
  <pre><code>row=int(input("number of rows:"))
  col=int(input("number of cols:"))
  x=1
  m=1
  amount=col
  while amount&gt;0:
      print("%5d"%m, end="")
      m=m+1
      amount-=1
  print()
  while x&lt;(row+1):
      y=1
      print(x, end="")
      while y&lt;(col+1):
          print("%4d"%(x*y), end="")
          y=y+1
      print("\n")
      x=x+1
  </code></pre>