title: Program to print the first 10 perfect squares
body: <p>I am trying to go over the natural number and test each natural number if it is the perfect square print that number, but my only condition is that print only first 10 perfect square numbers.</p>
  <pre><code>i =2
  n=1 #used for counting
  
  while 10&gt;=n:
          for j in range(1,i):
              x =1
              while x*x&lt;=j:
                  if x*x==j:
                      print(j)
                      n+=1
                  x+=1
              i+=1
              j+=1
  </code></pre>