This Python program calculates the simple interest based on the principal amount, interest rate, and time period provided by the user. Simple interest is a basic financial concept that determines the additional amount of money earned or paid on top of the initial investment or loan amount.
Algorithm:
- Read the principal amount, interest rate, and time period from the user.
- Calculate the simple interest using the formula: interest = (principal * rate * time) / 100.
- Print the calculated simple interest.
Python Program:
# Input principal amount, interest rate, and time period
principal = float(input("Enter the principal amount: "))
rate = float(input("Enter the interest rate: "))
time = float(input("Enter the time period in years: "))
# Calculate simple interest
interest = (principal * rate * time) / 100
# Print the calculated simple interest
print("Simple Interest:", interest)
Input :
Enter the principal amount: 1000
Enter the Interest Rate: 5
Enter the time periods in year : 2
Output :
Simple Interest : 100.0
In the above example, the user enters a principal amount of 1000, an interest rate of 5%, and a time period of 2 years. The program then calculates the simple interest as 100.0 and displays it as the output.