Calculadora do Pagamento Mensal de Empréstimo
import math
years = int((input('Please enter number of'
' years of loan ')))
annual_rate = float((input('Please enter the interest'
'rate (in %) ')))
principal = float((input('Please enter the'
' amount of loan ')))
rate = (annual_rate / 100)/12
rate1 = pow(1+rate,years*12)
monthly_payment = (principal*rate1*rate)/(rate1-1)
print('\n\nMonthly Payment:')
print('{:.2f} Euros'.format(monthly_payment))
Comentários
Enviar um comentário