8.9

loan_amount = 600000 - 200000

月利率

monthly_interest_rate = 0.0036

贷款期限(月)

loan_term_months = 30 * 12

每月还款额 = 贷款本金×月利率×(1 + 月利率)^n÷((1 + 月利率)^n - 1),其中 n 为贷款总月数

monthly_payment = loan_amount * monthly_interest_rate * (1 + monthly_interest_rate) ** loan_term_months / ((1 + monthly_interest_rate) ** loan_term_months - 1)

print("每月还款额约为:", round(monthly_payment, 2), "元")
print("学号:3022")

posted @ 2024-11-23 16:14  Tsuki*  阅读(17)  评论(0)    收藏  举报