This is my coding.
def compute_sum(a, b, tolerance=1e-5): """Compute the sum $\\sum^\\infty_{n=1} a^n / b^{n-1} until the partial sums are less