Write a program to compute simple interest in python
Answers
Answer:
Python program :
#1.
P = float(input("Enter the principal amount : "))
N = float(input("Enter the number of years : "))
R = float(input("Enter the rate of interest : "))
#2.
SI = (P * N * R)/100.
print("Simple interest : {}". format(SI))Explanation:
Answer:
Write a program to compute simple interest in python
Explanation:
p = float(input("Enter the principal amount: "))
t = float(input("Enter the time in years: "))
r = float(input("Enter the interest rate: "))
simple_interest = p * t * r / 100
print("Simple Interest = %.2f" %simple_interest)
p = float(input("Enter the principal amount: "))
t = float(input("Enter the time in years: "))
r = float(input("Enter the interest rate: "))
simple_interest = p * t * r / 100
print("Simple Interest = %.2f" %simple_interest)
Output:-
Enter the principal amount: 100000
Enter the time in years: 1
Enter the interest rate: 12
Simple Interest = 12000.00