Skip to content

Update Module4MortgageCalculatorChallengeSolution.py#2

Open
StephenAjayi wants to merge 1 commit into
GeekTrainer:masterfrom
StephenAjayi:patch-1
Open

Update Module4MortgageCalculatorChallengeSolution.py#2
StephenAjayi wants to merge 1 commit into
GeekTrainer:masterfrom
StephenAjayi:patch-1

Conversation

@StephenAjayi

Copy link
Copy Markdown

These videos are great but this challenge gave me a few problems because the monthly payments seemed astronomical. After some tinkering around i realized a couple things in the given info were inaccurate:

  1. The interest amount is compounded monthly, so if a user entered .05 as as their interest rate would actually be paying 5% interest per month, 60% interest a year and 600% interest on a 10 year loan. I made the change to line 17 to reflect interest properly.

2 For the monthly mortgage calculation, numberOfPayments should be an exponent on both sides of the equation , rather than being multiplied. I made this change to lines 23-24 as well.

These videos are great but this challenge gave me a few problems because the monthly payments seemed astronomical. After some tinkering around i realized a couple things  in the given info were inaccurate:

1. The interest amount is compounded monthly, so if a user entered .05 as as their interest rate would actually be paying 5% interest per month,  60% interest a year and 600% interest on a 10 year loan. I made the change to line 17 to reflect interest properly.
   
2  For the monthly mortgage calculation, numberOfPayments should be an exponent on both sides of the equation , rather than being multiplied. I made this change to line 23-24 as well.
@Rpasinatto

Copy link
Copy Markdown

I believe the formula in this challenge is wrong.
It should be: M=L[i(1+i)^n]/[(1+i)^n-1]
This is the correct way to calculate the monthly payment.
You can check it out multiplying M*n the result must be bigger than L.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants