Articles

Program to find simple interest in Python

Program to find simple interest in Python


In this python programming guide, we are going to learn

  • program to find simple interest in python

Program to calculate Simple Interest in Python

The program to calculate simple interest in Python is as follows:

 

# Owner : TutorialsInhand Author : Devjeet Roy
 
principal = float(input("Enter the principal: "))
rate = float(input("Enter the rate of interest: "))
time = float(input("Enter the time: "))

si = (principal * time * rate) / 100

print("The simple interest is Rs",si);

The output of the program to compute simple interest in python is as follows:

 

PS C:\Users\DEVJEET\Desktop\tutorialsInHand> python code.py
Enter the principal: 10000
Enter the rate of interest: 5
Enter the time: 3
The simple interest is Rs 1500.0

Few important tips about this program:

1. First we ask the user to enter the principal, rate of interest and the time period.

2. Then we find the simple interest (si) by (principal x rate x time)/100

3. We print the result in the terminal. 

 

Snapshot to write a python program to calculate the simple interest

write a python program to calculate the simple interest

 


Basic Python Programs

Would you like to see your article here on tutorialsinhand. Join Write4Us program by tutorialsinhand.com

About the Author
Devjeet Roy
Full Stack Web Developer & Blockchain Enthusiast
Page Views :    Published Date : Feb 03,2021  
Please Share this page

Related Articles

Like every other website we use cookies. By using our site you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service. Learn more Got it!