Programming Examples
Python program to calculate simple interest
Write a program to obtain principal amount, rate of interest and time from user and compute simple interest.
Solution
p = float(input("Enter principal: "))
r = float(input("Enter rate: "))
t = float(input("Enter time: "))
si = p * r * t / 100
print("Simple Interest =", si)
Output
 Enter any principal amount:3000
Enter rate of interest:10
Enter time:12
Simple Interest= 3600.0