This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import decimal | |
| P = 250_000 # Principal | |
| R = decimal.Decimal(.07125) / 12 # Divide by 12 for monthly rate | |
| N = 30 * 12 # Multiply by 12 for months | |
| EMI = (P * R * (1 + R)**N) / ((1 + R)**N - 1) # Equation for Estimated Monthly Payment | |
| total_interest_paid = 0 | |
| remaining_principal = P |