Sectie 2. Hoofdstuk 7
single
Challenge: Generate Amortization Schedule
Veeg om het menu te tonen
Taak
Swipe to start coding
Given a loan's principal, annual interest rate, and term in months, create a function that calculates the monthly payment and builds a pandas DataFrame showing the amortization schedule, with each month's payment broken down into principal and interest, and the remaining balance.
- Calculate the monthly payment using the amortization formula.
- For each month, determine the interest portion and principal portion of the payment.
- Update the remaining balance after each payment.
- Build a pandas DataFrame containing columns for month, payment, principal, interest, and remaining balance.
- Return the DataFrame.
Oplossing
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 2. Hoofdstuk 7
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.