房贷计算
Opened this issue · 0 comments
ZxYuan commented
<script src="https://cdn.bootcss.com/highlight.js/8.6/highlight.min.js"></script>
# 等额本息
def equal_principal_interest(principal, rate, years):
month_rate = rate / 12
months = years * 12
month_pay = (principal * month_rate * ((1 + monthRate) ** months)) / (((1 + monthRate) ** months) - 1)
return month_pay