Dremendo Tag Line

Calculate simple interest in Python

input() - Question 14

In this question, we will see how to input principal, rate, time in Python programming using the input() function and find the simple interest. To know more about input() function click on the input() function lesson.

Q14) Write a program in Python to input principal, rate, time and find the simple interest.

Formula: Simple Interest = (Principal * Rate * Time) / 100

Program

p=int(input('Enter principal '))
r=int(input('Enter rate '))
t=int(input('Enter time '))
si=(p*r*t)/100
print('Simple Interest={:.2f}'.format(si))

Output

Enter principal 5000
Enter rate 10
Enter time 1
Simple Interest=500.00
video-poster