Python program to calculate simple interest using function
Answers
Answer:
Simple interest is different than the compound interest. It is calculated on the main amount of loan. This amount is also known as the principal amount.
The main formula to calculate the simple interest is the same. To calculate the interest value, we need to know the principal amount, the rate of interest and the time period. This is a beginner level program and you will learn how to read user inputs, how to do basic multiplication/division and how to how to print out a custom variable value.
Answer:
Simple Interest Function is given below
Explanation:
# Function to calculates simple interest
def getSimpleInterest(P,R,T):
SI = (P * R * T) / 100
return SI
P = 1
R = 1
T = 1
# Print simple interest
print("Simple interest is", getSimpleInterest(P,R,T))