Python Programs | IT Developer
IT Developer

Python Programs



Share with a Friend

Python Programs - Functions

Function to compute Compound Interest - Python Program

Example 1 :

def compound_interest(principal, rate, time): """Return compound interest amount.""" amount = principal * (1 + rate/100)**time return amount - principal print(compound_interest(1000, 5, 2))

Output

 
OUTPUT  :
102.5