Python Program to Compute Simple Interest

Python Program to Compute Simple Interest

Write Python Program to Compute Simple Interest

# Python Program to Compute Simple Interest

r = 15
n = int(input("Enter Amount :--> "))
r = float(input("Enter Interest Rate :--> "))
d = int(input("Enter Duration (in months) :--> "))

ans = (n * r * d) / 100
print("Simple Interest :--> ", ans)

Output:

Enter Amount :-->  1000
Enter Interest Rate :-->  1.5
Enter Duration (in months) :-->  12

Simple Interest :-->  180.0