Question: Write a python program for a bank to review credit card apps based on a weighted score of three components - credit score,salary & job

Write a python program for a bank to review credit card apps based on a weighted score of three components - credit score,salary & job history.

The distribution of weights are below:

Credit score = .50 Salary = .45 Job history = .4

Credit Score function: A bank subscribes for credit_scores from three agencies - Experian, Transunion Equifax. Create an average of the three and check the deviation for each from this average. If the deviation is plus/minus 5% or more, discard that credit_score and calculate a new average for the remaining credit_scores. Scoring is done according to the following table:

If credit_score is greater than 850, score is 100 If credit_score > 800 and < 850, score is 80 If credit_score > 750 and < 800, score is 60 If credit_score > 700 and < 750, score is 40

otherwise the score is 20

Calculate the weighted credit score and return weighted_score_credit.

Salary function: For salary, the following slots are followed to assign a score.

If salary > 200,000, score is 100 If salary > 150,000 and < 200,000, score is 80 If salary > 100,000 and < 150,000, score is 60 If salary > 100,000 and < 50,000, score is 40

Otherwise the score is 20

Calculate weighted score and return weighted_score_salary

Job function:

There are two data points that is taken into account - years at current job and the career length. The second input is a year, subtract it from the current year to get the career length. Calculate a job ratio of years at current job by career length. The scoring is done following this table:

If years > 3 and jobratio > .6, score is 100 If years > 3 and jobratio > .5, score is 80 If years > 3 and jobratio > .4, score is 60 If years > 3 and jobratio > .3, score is 40

Otherwise the score is 20

Calculate the weighted score and return weighted_job_score.

In the main calculate total weighted average (sum of the return value from 3 functions).

If its greater than or equal to 50, approve the credit card application with a message else reject with an appropriate message.

Check your program with this example: John Daniel is working in his current company for 4 years. He is a professional since 2010 and currently making $117,000 a year. His credit scores are as follows:

Transunion 672 Experian 453 Equifax 855

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!