top of page
Click here to go to the home page of AskTheCode.

Python Program for compound interest

Team ATC

Asked: Anonymously |Category: Python

 

p=eval(input("Enter the value of P : "))

r=eval(input("Enter the value of r : "))

t=eval(input("Enter the value of t : "))

def compound_interest(principle, rate, time):

Amount = principle * (pow((1 + rate / 100), time))

CI = Amount - principle

print("Compound interest is", CI)

compound_interest(p, r, t)


 
 
 

Recent Posts

See All

Comments


bottom of page