In this post, we are going to make a Python Program to Calculate Simple Interest and Compound Interest. To make this program, we need three variables “Principle”, “Rate”, “Time”.

We will use the following basic formulas of mathematics to make Python Program to Calculate Simple Interest and Compound Interest.

- Simple Interest = (Principle * Rate * Time) / 100
- Amount = Principle * (1 + Rate / 100)^Time.
- Compound Interest = Amount – Principle

## Python Program to Calculate Simple Interest and Compound Interest

```
Principle = float(input("Enter Principle:"))
Rate = float(input("Enter Rate:"))
Time = float(input("Enter Time(n Years):"))
Simple_interest = (Principle * Rate * Time) / 100
Amount = Principle * (pow((1 + Rate / 100), Time))
Compound_interest = Amount - Principle
print("Simple Interest:", Simple_interest)
print("Compound Interest:", Compound_interest)
```

`Principle:8000Rate:7Time(n Years):2Simple Interest: 1120.0Compound Interest: 1159.2000000000007`

However, This is a very simple python program for beginners. On the other hand, You should also try to make a menu-driven program in python using a while loop for a simple calculator.

It is also an important program for class 11th students. In addition, we can make this program using functions.

## Simple Interest Program in Python using function

```
def Simple_interest(P, R, T):
SI = (P * R * T) / 100
print("Simple Interest:", SI)
Principle = float(input("Enter Principle:"))
Rate = float(input("Enter Rate:"))
Time = float(input("Enter Time(n Years):"))
Simple_interest(Principle, Rate, Time)
```

`Principle:9000Rate:2Time(n Years):2Simple Interest: 360.0`

## Algorithm to Calculate Simple Interest

- Take input from the user for principle, rate, and time.
- Now, we know the formula to calculate simple interest: Simple Interest = (Principle * Rate * Time) / 100
- Print the simple interest.

## Quick Algorithm to Calculate Compound Interest

- Assign the formula for the amount i.e., Amount = Principle * (1 + Rate / 100)^Time.
- Print “Amount – Principle”, which is compound interest.

## About this post

This post is all about clearing all your doubts regarding a python program to print simple interest & compound interest. Moreover, If you have any doubts regarding this program you should feel free to ask in the comment section. **In conclusion**, these programs are an important aspect of increasing coding abilities.

Simple Python Program to Print Hello world

Python program to find factorial of a number