Simple Mortgage calculator

## This is a program to calculate mortgage

cost = input('Please enter the cost of property(Numbers only)\n')
cost = float(cost)
downpayment = input('Please enter your contribution (Numbers only)\n')
downpayment = float(downpayment)
interest_rate = input('What interest rate are you comfortable with \n')
interest_rate =float(interest_rate)
repay_years = input('In how many years will you repay the loan?(Number Only)')
repay_years = int(repay_years)
loan_amount = cost - downpayment
repay_months = repay_years *12
repay_months =int(repay_months)
mortgage_rate = interest_rate * (1/100)
emi = loan_amount / repay_months
emi = emi + ((emi*mortgage_rate)/ repay_months)
emi = int(emi)

print ('The cost of your selected property is'+ str(cost) + '\n')
print ('You will put in'+ 'Rs. ' + str(downpayment) +'\n')
print ('Your loan amount is Rs. ' + str(loan_amount)+ '\n')
print ('Your EMI'+' Over '+ str(repay_months) + ' months ' '@'+ str(interest_rate)+ ' % will be Rs.'+ str(emi)+'\n')

## End Of Code

 

Leave a Reply