Calculating mortgage interest in Python

后端 未结 6 687
轻奢々
轻奢々 2020-12-31 17:46

I am currently learning python through a video tutorial on youtube, and have come up against a formula I cannot seem to grasp, as nothing looks right to me. The basic conc

6条回答
  •  攒了一身酷
    2020-12-31 18:16

    This mortgage package does it nicely:

    >>> import mortgage
    >>> m=mortgage.Mortgage(interest=0.0375, amount=350000, months=360)
    >>> mortgage.print_summary(m)
                         Rate:      0.037500
                 Month Growth:      1.003125
                          APY:      0.038151
                 Payoff Years:            30
                Payoff Months:           360
                       Amount:     350000.00
              Monthly Payment:       1620.91
               Annual Payment:      19450.92
                 Total Payout:     583527.60
    

提交回复
热议问题