복리
![[함수] 단리, 복리 계산기](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fm3wY9%2FbtrAJ0SeePZ%2Fs9lTKYBXjgk19CFTSk9qRK%2Fimg.png)
[함수] 단리, 복리 계산기
🔍 문제 원금, 기간, 이자율 입력 시, 단리, 월복리, 연복리 출력 🗝 사용함수 format(n, ',') : 1000의 자리에서 ' , ' ex) 1,000 🖥 실행 def formN(n): return format(n, ',') def simpleRate(m,n,r): totalMoney = 0 totalRateMoney = 0 for i in range(n): totalRateMoney += m*r*0.01 totalMoney = m + totalRateMoney print(f'단리: {formN(int(totalMoney))}원') #월복리 def compoundRate(m,n,r): totalMoney = m monthRate = r*0.01/12 month = n*12 for i in ran..