#Illustrate definition and use of a simple function
def square(x):
    y = 0
    itersLeft = x
    while (itersLeft > 0):
        y = y + x
        itersLeft = itersLeft - 1
    return y

print 'Test square function'
i = 0
while i < 10:
    result = square(i) + square(i + 1)
    print result
    i = i + 1




