Create a program to input principal amount, time and rate of interest. Calculate the Simple Interest in python
Answers
Answer:
#SI-finder.
def SI_Finder():
Amount=int(input("Enter-the-Principal-Amount\n"))
Rate=int(input("Enter-the-Rate-of-interest\n"))
Time=int(input("Enter-the-Time-period\n"))
interest=(Amount*Rate*Time/100)
print("The interest is Rs", interest)
text=SI_Finder()
Explanation:
Simple Interest - Python
Simple Interest is the method of calculating the interest amount for a particular principal amount of money at some rate of interest.
The basic formula to calculate Simple Interest is as follows:
Where, P denotes Principal Amount, R denotes Rate of Interest and T denotes Time Period.
We need to first take User Input for the values of Principal Amount (P), Rate of Interest (R) and Time Period (T). We will do this by using Scanner.
We store them as float values. Then, we calculate the Simple Interest using the formula and display it.
SimpleInterest.py
P = float(input("Enter Principal Amount (P): "))
R = float(input("Enter Rate of Interest (R): "))
T = float(input("Enter Time Period (T): "))
SI = (P*R*T)/100
print("%f * %f * %f/100 = %f" %(P, R, T, SI))