Question
PYTHON LANGUAGE Use the Design Recipe to write a function named mortgageApproval , to decide whether or not to approve a mortgage loan. The function
PYTHON LANGUAGE
Use the Design Recipe to write a function named mortgageApproval, to decide whether or not to approve a mortgage loan. The function should return yes, no or maybe. The function is given 6 pieces of information about a mortgage applicant, in the following order: the loan amount s/he is applying for, her/his current salary, her/his current cash in accounts, her/his estimated non-cash assets, her/his numerical credit score, and her/his last name. The following business rules determine whether or not to approve the loan:
No mortgage will be approved if an applicant has less than 15% of the loan amount as cash in accounts (i.e., if less than 15%, the mortgage decision is no).
No mortgage will be approved if an applicant has a credit score less than 590.
For applicants with credit scores in the range [590 700) (the value 590 is included, but the value 700 is not included) current cash in accounts must be greater than or equal to 25% of the loan amount.
All applicants must have a current salary greater than one-third of the balance of the loan amount, which is considered to be the loan amount minus the cash in accounts.
Any applicant with the last name 'Doe' must have at least $750,000 in non-cash assets or the loan is declined.
Any applicant that made it past rules 1 5 and has more cash in accounts than the loan amount is automatically approved (i.e., the mortgage decision is yes). Otherwise, the applicant must come to the bank for a personal interview (i.e., the mortgage decision is maybe.)
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