Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assignment Specifications 1 . You will develop a Python program which calculates details for a mortgage loan for one or more houses based on the
Assignment Specifications
You will develop a Python program which calculates details for a mortgage loan for one or more houses
based on the input variables described in detail below.
The program will first print a simple welcome message and the main prompt both messages are stored in the
variables WELCOMETEXT and MAINPROMPT in the starter code and then repeatedly ask if the user wishes
to process another mortgage. If the users response is the letter Y or the letter y the program will proceed with
the steps to calculate the values associated with a new set of inputs for a mortgage loan. If the users response is
anything else, the program will quit.
When the user chooses to process a mortgage loan, the program will prompt the user to enter the desired
location of the house, the desired square footage of the house, the users maximum monthly payment, the users
expected down payment, and the current APR. You should use the prompts provided for each of these inputs in
the file stringstxt or in the starter code zip file and defined as LOCATIONSTEXT,
SQUAREFOOTAGETEXT, MAXMONTHLYPAYMENTTEXT, DOWNPAYMENTTEXT, and
APRTEXT, respectively. Users will be advised to enter as much information as possible or NA if they dont
have a value to input. The program will behave in response to which values are present and which are missing.
For each of the inputs, handle the input as follows.
For location, the user must provide one of the following cities: Seattle, San Francisco, Austin, East
Lansing. The starter file contains the corresponding property tax rates and real estate prices per square
foot for each of these locations. If the user enters any other value, use the average national values for
those two metrics defined as AVERAGENATIONALPROPERTYTAXRATE and
AVERAGENATIONALPRICEPERSQFOOT and display the unknown location message the
message is stored in the variable LOCATIONNOTKNOWNTEXT in the starter code
For this project, we assume that all inputs are valid:
For square footage, you may assume the user has entered a positive value or NA If the value is
numerical, convert it to a float; Otherwise, it means the user did not provide a square footage.
For maximum monthly payment, you may assume the user has typed a positive value or NA If
the value is numerical, convert it to a float; Otherwise, it means the user did not provide a
monthly payment.
For down payment, you may assume the user has typed a positive value or NA If the value is
numerical, convert it to a float; Otherwise, you should assign the variable a float value of
For APR, you may assume the user has typed a positive value between and or NA If it
is numerical, convert it to a float and store it for use in your calculations as a fraction instead of
percentage ie not as you would display it nor as the user typed it; otherwise, assign the value
stored in the APR constant that has been provided.
What kind of calculations and what results to display depends on if the user entered the square footage
only case the square footage and the maximum monthly payment case the maximum monthly
payment only case or neither the square footage nor the maximum monthly payment were provided
case
Case : square footage only
If the user has provided the square footage only, you will compute the details of the mortgage loan given
the values of the other variables presuming those values are valid You should first estimate the home
cost for the given location based on the corresponding values. You will also need to calculate the
CSE Spring
principal value based on the estimated home cost and the down payment. Check the assignment notes
section below for all the necessary formulas.
Mortgage loan information will be displayed containing all the provided information as well as the
monthly taxes and the monthly payment. The message should be displayed like the one shown below.
In the starter code, we provide an incomplete string that you need to fill in with the correct formatting
for numbers using the example message below in red You can use either the format method or
fstrings. Note that all whole numbers in the outputs are floats that were rounded with precision
Do not convert to integers because it will truncate the floats and not round.
In Austin, an average sq foot house would cost $
A year fixed rate mortgage with a down payment of $ at APR results
in an expected monthly payment of $taxes $mortgage payment $
Finally, ask the user if they wish to see the amortization table for the mortgage loan using the string
stored in the variable AMORTIZATIONTEXT An amortization table shows how the monthly payment
will be allocated each month. Some of the payment is directed to pay off the interest owed on the loan,
and the rest goes to reduce th
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