Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

emi calculator python code

# Python program to calculate monthly EMI (Equated Monthly Installment)

# EMI Formula = p * r * (1+r)^n/((1+r)^n-1)

# If the interest rate per annum is R% then 
# interest rate per month is calculated using: 

# Monthly Interest Rate (r) = R/(12*100)

# Varaible name details:
# p = Principal or Loan Amount
# r = Interest Rate Per Month
# n = Number of monthly installments

# Reading inputs from user
p = float(input("Enter principal amount: "))
R = float(input("Enter annual interest rate: "))
n = int(input("Enter number of months: " ))

# Calculating interest rate per month
r = R/(12*100)

# Calculating Equated Monthly Installment (EMI)
emi = p * r * ((1+r)**n)/((1+r)**n - 1)

print("Monthly EMI = ", emi)
Comment

PREVIOUS NEXT
Code Example
Python :: find the index of nanmax 
Python :: sort python dictionary with values of list by index of first one 
Python :: how to detect if a key was press down 
Python :: Python - Perl - Tcl 
Python :: python count down advanced 
Python :: python two list into dictinaray 
Python :: python Access both key and value without using items() 
Python :: Abstract Model inherit from another model django 
Python :: what is flash in flask 
Python :: generator expression python 
Python :: python import only one function 
Python :: Convert torch.nn.Embedding layer to numpy array 
Python :: how to preserve white space when joining an array python 
Python :: difference between cut and qcut pandas 
Python :: python - create frequency table between two columns 
Python :: why mentioning user agent in request library 
Python :: django template child data in nested loop 
Python :: create loading in pyqt 
Python :: pyqt message box set information text 
Python :: plt.savefig no frame 
Python :: Improve the Request Change User-Agent 
Python :: py random sample 
Python :: Python Printing negative timedelta object 
Python :: Get Today’s Year, Month, and Date using today method 
Python :: using python script in C# interface 
Python :: deoplete 
Python :: python interate with two list 
Python :: visualising centroid of an unsupervised learning algorithm 
Python :: Implementing the hashing trick 
Python :: Read a string with digits from the input and convert each number to an integer. Create a list in which you should include only odd digits. 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =