Nth term in GP

 def termOfGP(A,B,N):

    #Your code here

    r=B/A

    return A*(pow(r,N-1))

Comments