Python program to calculate compound interest.

In this python basic program, we will calculate compound interest using formula p*((1+r/100)**n).

Steps to solve the program
  1. Take the principal amount, rate of interest, and a number of years as input through the user.
  2. Calculate the compound interest using the formula p((1+r/100)**n).
  3. Print the output.
				
					p = int(input("Enter principle amount: "))
r = float(input("Enter interest rate: "))
n = int(input("Enter number of years: "))

amount = p*((1+r/100)**n)

print("Compoud interest: ",amount)
				
			

Output :

				
					Enter principle amount: 10000
Enter interest rate: 10
Enter number of years: 2
Compoud interest:  12100.000000000002
				
			

check given number is palindrome or not.

check the prime number.

Leave a Comment