Question
Create a Python function with the following rubric: function name: get_min_payment() Parameters::: the total amount of the mortgage (called the principal; should be a positive
Create a Python function with the following rubric:
function name: get_min_payment()
Parameters:::
the total amount of the mortgage (called the principal; should be a positive number)
the annual interest rate (should be a float between 0 and 1) the term of the mortgage, in years (should be a positive integer; default value: 30) the number of payments per year (should be a positive integer; default value: 12) Functionality
Compute the minimum mortgage payment.
Should use the formula A= Pr(1+r) n (1+r) n1 where A is the minimum payment amount P is the principal amount r is the interest rate per payment (the annual interest rate divided by the number of payments per year) n is the total number of payments (the term of the mortgage in years the number of payments per year)
Use math.ceil() to raise the minimum payment you calculated to the next highest integer, and return this integer. You will need to import math in order to do this. Remember, import statements belong at the top of your script, right after your script docstring
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started