Task: Write a program to compute the sum of integers from k to n.
output: def sum(k, n):
    sum = 0
    for i in range(k, n+1):
        sum += i
    return sum