Program in python to find the simple interest based upon number of years


Write a program in python to find the simple interest based upon number of years. If number of years is more than 12 rate of interest is 10 otherwise 15.

-----------------------------
p = int(input("Enter any principle amount "))
t = int(input("Enter any time "))
if(t>10):
    si = p*t*10/100
else:
    si = p*t*15/100
print("Simple Interest = ",si)

-----------------------------

Output:-

Enter any principle amount 5000
Enter any time 12

Simple Interest =  6000.0

Post a Comment

0 Comments