Python Program to Calculate Simple Interest

In this post, we will be learning how to write a Python Program to Calculate Simple Interest of the given values of Principle, Time and Rate.

The formula to Calculate Simple Interest

To calculate S.I, we have a formula:-

S.I = (P*R*T)/100
Where,
S.I represents Simple Interest,
P represents Principle,
R represents Rate (annually),
T represents Time (in years).

Code:-

# Taking an input for principle (p)
p = float(input("Enter the principle: ")) 
# Taking an input for rate per year (r)
r = float(input("Enter the rate: "))
# Taking an input for time (t)
t = float(input("And Enter the time(in years): "))

# formula for Simple Interest (si) is (p*r*t)/100
si = (p*r*t)/100

# printing the simple interest
print("The S.I is",si)

Output:-

Enter the principle: 5000
Enter the rate: 5
And Enter the time(in years): 2
The S.I is 500.0

That was all about this program. If you find any problem you can comment below.

You can learn about many other Python Programs Here.







The following two tabs change content below.
Amit Rawat

Amit Rawat

Founder and Developer at SpiderLabWeb
I love to work on new projects and also work on my ideas. My main field of interest is Web Development.

You may also like...