기타/기타
금리계산 (원리금균등상환)
bright jazz music
2022. 6. 23. 15:30
import numpy as np
import matplotlib.pyplot as plt
left_credit = float(input("대출금: "))
yearly_interest_rate = float(input("금리: "))
pay_month = int(input("대출기간: "))
print("연 이자 = ", yearly_interest := left_credit / 100 * yearly_interest_rate)
print("월 이자 = ", monthly_interest := yearly_interest / 12)
print("월 상환 원금 = ", monthly_credit := left_credit / pay_month)
print("월 총 상환금 = ", monthly_total_payback := monthly_credit + monthly_interest)