#
# Title: Assignment 1, Question 1 - For loop example
# Author: Nicholas Fitzkee (nickfitzkee at jhu dot edu)
# Date: January 30, 2006
# Summary: Calculate a telescoping sum
#
# Description:
#
# This program prints out all the numbers from zero to nine, and then
# it prints the sum of all the numbers from zero to nine.
#
sum = 0 # Initialize sum
for j in range(10):
print j
sum = sum + j # Increment sum
print sum