
"""
Ch8 Q1
A function for running sum of the first n natural numbers
"""

def my_sum(n):
    sum = 0
    for i in range(n+1):
        sum += i
    return sum

print(my_sum(10)) # test the result with n = 10

