def geometric_sum(a, r, n=7):
    """Compute a geometric sum of n terms
    Arguments:
    a --- coefficient
    r --- ratio
    n --- terms to sum (default: 7)
    """
    total = 0
    for i in range (0, n):
        total = total + a *r ** i
    return total