Simple interest formula is given by:
Simple Interest = (P x R x T)/100
Where,
P is the principle amount
T is the time and
R is the rate
Simple Interest = (P x R x T)/100
Where,
P is the principle amount
T is the time and
R is the rate
Simple Interest is a banking term, which defines the interest on the money. Simple interest is relevant to saving, borrowing, and investing, though it's typically most fruitful when borrowing, because it means your debt won't pile on over time. Simple interest most commonly applies to short-term loans, like car loans, installment loans, personal loans, and some types of mortgages.
Code :
def si(p, r, t):
print("Principal : ₹",p)
print("Rate : ",r,"%")
print("Time : ",t,"years")
si = (p*r*t)/100
print("Simple Interest : ₹",si)
prin = float(input("Enter Principal Amount : "))
rat = float(input("Enter Rate of Interest per annum : "))
tim = float(input("Enter Time in years : "))
si(prin, rat, tim)
Output :
Enter Principal Amount : 20000
Enter Rate of Interest per annum : 20
Enter Time in years : 4
Principal : ₹ 20000.0
Rate : 20.0 %
Time : 4.0 years
Simple Interest : ₹ 16000.0
Explanation :
The logic to this problem is simple. We have to define a function which will calculate simple interest using the formula. Then take the input of principle amount, rate of interest and time period. Then give the arguments to the function.
0 Comments
Ask Your Queries in the comments