Write a function to calculate the compound interest for principal p, rate r and time in years y


Topic: Write a function to calculate the compound interest for principal p, rate r and time in years y

Solution

def get_ci(p:float, r:float, t:float, n:float)->float:
    return round(p*((1+(r/(n*100)))**(n*t)) - p,2)



List all Python Programs