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.
i =2
n=1 #used for counting
while 10>=n:
for j in range(1,i):
x =1
while x*x<=j:
if x*x==j:
print(j)
n+=1
x+=1
i+=1
j+=1