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 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?
What is the down payment?
Have you held your current job for at least a year? yes
What is your annual salary?
You are eligible for this loan.
What is the loan amount?
What is the down payment?
Have you held your current job for at least a year? yes
What is your annual salary?
You are eligible for this loan.
What is the loan amount?
What is the down payment?
Have you held your current job for at least a year? no
What is your annual salary?
You are not eligible for this loan.
What is the loan amount?
What is the down payment?
Have you held your current job for at least a year? yes
What is your annual salary?
You are eligible for this loan.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
