Python Program To Calculate Simple Interest

The formula for simple interest is

Simple Interest = (P x R x T) / 100

P is the Principle amount

R is Rate

T is Time

Program

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Python program to find simple interest 
# write a program to calculate simple interest
def SimpleInterest(p,r,t):
    # caluclate the simple interest and stored it in result
    result = (p * t * r)/100

    # print the result
    print('The Simple Interest is', result)
    return result

# take input from the users
p = int(input("Enter the principal amount: "))
r = float(input("Enter the rate of interest: "))
t = int(input("Enter the time period: "))

# call the function
SimpleInterest(p,r,t)

# Python program to find simple interest - docodehere.com 

Output


Enter the principal amount: 200 Enter the rate of interest: 10 Enter the time period: 1 The Simple Interest is 20.0

Next Post Previous Post
No Comment
Add Comment
comment url