Sunday, 14 November 2021

To calculate Simple and Compound interest.

 p = int(input("Enter principal amount = ")) 

r = int(input("Enter the rate = "))
t = int(input("Enter time  = "))
si = (p * r * t ) / 100
com = p * ( (1 + (r / 100 ))** t ) - p
print("Simple interest = ",si)
print("Compound interest = ",com) 

No comments:

Post a Comment