8.9

Tsuki*發表於2024-11-23

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")

相關文章