# file: InClassAssignment2_mod.py
#
# This program finds the sum of first n natural numbers,
# where the value of n is provided by the user.
def main():
print("This program finds the sum of the first n natural numbers,", end=' ')
print("where n is provided by the user.")
n = int(input("Please, input a natural number:"))
sum_ = 0 # initially, the sum is 0
for i in range(1,n+1): # sequence [1,2,3,...,n] will be generated
print(i,end='+') # makes a fancy output of the final result
sum_ = sum_ + i # adding the next number in the sequence to the sum
print("0 =",sum_)
main()