Programming Pandit

c/c++/c#/Javav/Python


Latest Update

Tuesday, November 17, 2020

Python program to calculate compound interest by G Krishna Chauhan

Source Code


p=float(input("Enter the principal amount : ")) 

r=float(input("Enter the rate of interest : ")) 

t=float(input("Enter the time in years : ")) 

x=(1+r/100)**t 

CI= p*x-p 

print("Compound interest is : ", round(CI,2)) 




OUTPUT


 Enter the principal amount : 400

Enter the rate of interest : 8.5

Enter the time in years : 1

Compound interest is :  34.0

No comments:

Post a Comment