Simple Interest in Python

In this article, we will learn about the calculation of simple interest in Python 3.x. Or earlier.

Simple interest is calculated by multiplying the daily interest rate by the principal amount by the number of days that elapse between the payments.

Mathematically,

Simple Interest = (P x T x R)/100
Where,
P is the principal amount
T is the time and
R is the rate

For example,

If P = 1000,R = 1,T = 2
Then SI=20.0
Now let’s see how we can implement a simple interest calculator in
Python.

Example

P = 1000
R = 1
T = 2
# simple interest
SI = (P * R * T) / 100
print("simple interest is", SI)

Output

simple interest is 20.0

Leave a Reply

Your email address will not be published. Required fields are marked *