In this Python program, we will learn how to calculate the simple interest. Before we start with the example, let me tell you the formula to calculate the simple interest.
Simple Interest = (Principal Amount * Rate of Interest * Number of years) / 100
Here is the source code of the program to calculate the simple interest
# Python Program to Calculate the Simple Interest
# To Take input from the User
principal_amount = float(input("Enter the Principal Amount: "))
rate_of_int = float(input("Enter the Rate Of Interest: "))
time_period = float(input("Enter Time period in Years: "))
simple_interest = (principal_amount * rate_of_int * time_period) / 100
print("\nSimple Interest for Principal Amount {0} = {1}".format(principal_amount, simple_interest))
Enter the Principal Amount: 50000
Enter the Rate Of Interest: 8.25
Enter Time period in Years: 5
Simple Interest for Principal Amount 50000.0 = 20625.0
Comments