Write a program in python to calculate compound simple interest after taking the principle amount, rate and time
----------------------------------------
pa=int(input("Enter the Principal Amount : "))
r=int(input("Enter the Interest Rate : "))
t=int(input("Enter the Tenure : "))
temp=1+r/100
f=1
for i in range(1,t+1):
f=f*temp
Amount=pa*f
interest=Amount-pa
print("The interest on ",pa," with rate ",r," is ",interest)
----------------------------------------
Output:-
Enter the Principal Amount : 5000
Enter the Interest Rate : 4
Enter the Tenure : 3
The interest on 5000 with rate 4 is 624.3200000000006
0 Comments