Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Module4MortgageCalculatorChallengeSolution.py #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

StephenAjayi
Copy link

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

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants