Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program for a bank to compare home loan applicants. Your program will enter the details of many applicants, and then write all the

Write a program for a bank to compare home loan applicants. Your program will enter the details of many applicants, and then write all the details into the document using Python.

Input In real life, you might use a form for entering data, but for the sake of this question, please use the input function.

For each applicant record being considered the user of your software needs to enter the following fields in order:

lastName: the surname of the applicant.

firstName: the given name of the applicant.

loanValue: the amount of loan requested.

assetsNet: total assets claimed by the applicant minus the value of any outstanding loans.

monthlyIncome: the monthly income of the applicant.

Input is terminated using the last name of "ZZZ". Validation as part of the Input Use the strip() method of a string to discard leading and trailing spaces from all fields. In case of input errors, you will issue an error message and input again. You will need to validate the following input fields: lastName and firstName, need to be non-empty strings. loanValue, assetsNet and monthlyIncome must be valid positive currency values. See isValidCurrency() below. Please complete the following function. It takes a single string argument and return a boolean value of true if the argument is a valid currency and return false otherwise: isValidCurrency() # Is the argument a valid currency amount, e.g. # aa = isValidCurrency("fred"); # aa will get the value false. The danger coefficient is calculated according to the following expression:- ((loanValue - assetsNet) / monthlyIncome) Output The output is generated using the print function and using a blank line to separate records. The danger co-efficient should be printed as part of the record. A given student record may appear as follows: danger coeff: 5.0 first name: Fred last name: Bloggs loan value: 256000.00 net assets: 56000.00 monthly income: 40000.00

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

To find integral of sin(logx) .

Answered: 1 week ago

Question

What is Centrifugation?

Answered: 1 week ago

Question

To find integral of ?a 2 - x 2

Answered: 1 week ago

Question

To find integral of e 3x sin4x

Answered: 1 week ago

Question

To find the integral of 3x/(x - 1)(x - 2)(x - 3)

Answered: 1 week ago