Write a Python program to calculate the amount payable if money has been lent on simple interest. Principal or money lent = P, Rate of interest = R % per annum and Time = T years. Then Simple Interest (SI)=(P * R * T) / 100 Amount payable = Principal + SI. P, R and T are given as input to the program.
Question
Write a Python program to calculate the amount payable if money has been lent on simple interest.
Principal or money lent $=\mathrm{P}$, Rate of interest $=\mathrm{R} \%$ per annum and Time $=$ T years. Then Simple Interest $(\mathrm{SI})=(\mathrm{P} \times \mathrm{R} \times \mathrm{T}) / 100$
Amount payable $=$ Principal + SI.
$\mathrm{P}, \mathrm{R}$ and $\mathrm{T}$ are given as input to the program.
✨ Free AI Tools for You
Powered by Chatterbot AI
Answer
Here is a Python program to calculate the amount payable if money has been lent on simple interest. The program takes the principal amount (P), rate of interest (R), and time (T) as input from the user and then calculates the simple interest (SI) and the total amount payable.
# Program to calculate the amount payable on simple interest
# Input values
P = float(input("Enter the principal amount (P): "))
R = float(input("Enter the rate of interest (R) per annum: "))
T = float(input("Enter the time (T) in years: "))
# Calculate simple interest
SI = (P * R * T) / 100
# Calculate total amount payable
amount_payable = P + SI
# Display results
print(f"Simple Interest (SI): {SI}")
print(f"Amount Payable: {amount_payable}")
Explanation:
Inputs: The user is prompted to enter the principal amount, rate of interest, and time.
Simple Interest Calculation: The formula $\mathrm{SI} = \frac{\mathrm{P} \times \mathrm{R} \times \mathrm{T}}{100}$ is used to calculate the simple interest.
Total Amount Payable: The principal amount is added to the simple interest to get the total amount payable.
Output: The simple interest and the total amount payable are printed out.
India's 1st AI Doubt Solver for CBSE, JEE, and NEET
Ask a Question for Freeand then it's just ₹212 a month