6. Write a program to calculate EMI as per fortnula : E = PR (1+ R)n /((1+ R)” -1 ) where E = EMI ; P = Principal Loan Amount ; R = Rate, of interest per month i.e., (Annual rate of interest/100/12) ; n = tenure of loan repayment in months. Get the input from user (e.g., calculate EMI for loan amount of 2,00,000 at 10% p.a. rate of interest (10/100/12) for a period of 2 years i.e., 24 months.

p = int(input(‘Enter principal : ‘))
r = int(input(‘Enter annual rate of interest : ‘))/1200
n = int(input(‘Enter tenure of loan : ‘))
print(‘EMI is’, p*r*pow((1+r), n)/(pow((1+r), n)-1))