# print the first thousand integers, 1...1000, one per line, 
# and then print("All done")
#
def printFirstThousand():
    current = 1
    
    while (current <= 1000):
        
        print(current)
        
        current = current + 1
        
    print("All done")
    
# return sum of first thousand integers: 1...1000
#
def sumOfFirstThousand():
    result = 0

    current = 1
    while (current <= 1000):

        result = result + current
        
        current = current + 1
        
    return result

# return the sum of the first one thousand squares: 1, 4, 9, ...
#
def sumOfFirstThousandSquares():
    result = 0

    current = 1
    while (current <= 1000):
        
        currentSquared = current * current
        result = result + currentSquared
        
        current = current + 1
        
    return result

# return the sum of first n integers: 1...n
#
def sumOfFirstN(n):
    result = 0
    #
    current = 1
    while (current <= n):
        print("current:", current)
        result = result + current
        
        current = current + 1
        
    return result



 
