How To Find Simple Interest In Python Program?
Hello Friends,
In this blog, I will show you how to calculate simple interest using python. I am going learn you python find simple interest example. We will talk about find simple interest in python.
We will use the simple interest formula Si = (P * R * T)/100 where P is the principle amount, R is the rate of interest, and T is the time period.
Here i will give you two example for how to calculate simple interest using python So let's see below example:
Formula
- P is the principle amount
- T is the time and
- R is the rate
si = (P x T x R)/100
Example 1 :
# Python program to find simple interest
p = input("Enter Principal: ")
t = input("Enter Time Period: ")
r = input("Enter Rate Of Interest: ")
# find simple interest
si = (p * t * r)/100
print('The Simple Interest is', si)
Example 2 :
# Python program to find simple interest
def findSimpleInterest(p,t,r):
print('The principal is', p)
print('The time period is', t)
print('The rate of interest is',r)
si = (p * t * r)/100
print('The Simple Interest is', si)
return si
findSimpleInterest(8, 6, 8)
It will help you....
- Get Last 2 Digits of Number in Python Tutorial Example
- How to Sum of First and Last Digit of Number in Python?
- How to Get First and Last Digit of Number in Python?
- Get the Last Digit of Number in Python Tutorial Example
- Get the First Digit of Number in Python Tutorial Example
- How to Remove All Decimals from Number in Python?
- How to Convert String to Float with 2 Decimal Places in Python?
- How to Format Number to 2 Decimal Places in Python?