Programming Examples

Python program to calculate the compound interest


Write a program to Calculate the Compound Interest

Solution

import math
prin=float(input("Enter the Principal Amount : "))
rate=float(input("Enter the Rate : "))
time=float(input("Enter the Time (in year) : "))
amt=prin*(math.pow((1+rate/100),time))
ci=amt-prin
print("Compound Interest is",ci)
Output

Enter the Principal Amount : 4000

Enter the Rate : 7.6

Enter the Time (in year) : 3

Compound Interest is 983.0679040000014

CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad