Thursday, November 11, 2010

test snippet

print('This program will print a list that contains perfect squares in a range of 1 to 101')
squares = ()
count = 1
sqrt = 1
i = 1
for count in range(1,101):
for sqrt in range(1,11):
if sqrt*sqrt == count:
#

print(sqrt)
print('Perfect Square #{0} is {1}'.format(i, count))
strqrt = (str(sqrt), )
squares = squares + (strqrt)
i = i + 1
sqrt = sqrt + 1
else:
#print('Count is: {0}'.format(count))
sqrt = sqrt + 1
#if count == 100:
#print('Sqrt is {0}'.format(sqrt))

print(squares)
print(squares[2])