On morgage payment

John Thingstad john.thingstad at chello.no
Thu Oct 18 16:41:32 EDT 2001


P    = i^n * P    - d * (i^n -1 / i -1)
  n               0

can be written as:

def morgage(PStart, interest,  monthlyPayment, numPayments):
    """Compute money remaining after a given number of downpayments given the start value and interest."""
    return interest**numPayments * PStart  - montlyPayments *((intrest**numPayments - 1) / (intrest - 1))





More information about the Python-list mailing list