Basic Programs


Python Program to Calculate simple interest


Write a python program to input principal(P), rate(R) and time(T) from the user and calculate Simple Interest.

Simple Interest (S.I) Formula is,

simple interest in c program
  • P - Pricipal Amount
  • R - Interest Rate
  • T - Time (in Years)
example.py
p=float(input("Enter Principle Amount : "))       
t=float(input("Enter Time (Years) : "))
r=float(input("Enter Interest Rate : "))
si=(p*r*t)/100
print("Simple Interest is ",si)

Output

Enter Principle Amount : 5000
Enter Time (Years) : 3
Enter Interest Rate : 2.5
Simple Interest is  375.0

Prev Next