Question: Loan eligibility Purpose To test the ability to write appropriate conditional expressions using relational and logical operators Directions and example Write a program to collect

Loan eligibility
Purpose
To test the ability to write appropriate conditional expressions using relational and
logical operators
Directions and example
Write a program to collect information from a user and determine whether or not
that person is eligible for a loan. The person is eligible for the loan if they have a
down payment that is at least 20 percent of the loan amount or if they have held
their job for at least a year and their annual salary is at least half the loan amount.
Below are some example executions.
What is the loan amount? 50000
What is the down payment? 10000
Have you held your current job for at least a year? yes
What is your annual salary? 20000
You are eligible for this loan.
What is the loan amount? 100000
What is the down payment? 15000
Have you held your current job for at least a year? yes
What is your annual salary? 70000
You are eligible for this loan.
What is the loan amount? 30000
What is the down payment? 3000
Have you held your current job for at least a year? no
What is your annual salary? 50000
You are not eligible for this loan.
What is the loan amount? 40000
What is the down payment? 3000
Have you held your current job for at least a year? yes
What is your annual salary? 30000
You are eligible for this loan.
 Loan eligibility Purpose To test the ability to write appropriate conditional

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!