CSE 110 | Programming Building Blocks

06 Prepare: Checkpoint

Qualifying for a Loan

Overview

For this assignment, you will implement a simplistic system to determine if a user can qualify for a loan.

The Problem: Qualifying for a loan

When loaning money to someone, you want to have some level of confidence that they will be able to repay the loan.

There are different characteristics you might base this decision on, or different questions you might ask someone. And depending on their answers to those questions, you might ask other questions. For example, consider the following possible questions:

Assignment

Write a program to determine whether to loan money based on the following rules.

First, ask for a rating from 1–10 on the following:

Then, you will create a boolean variable for whether you should loan the money that will be set to either True or False. Set up a series of if statements to decide if your decision to loan is "yes" or "no" according to the following rules:

Finally, display the decision to the user.

Sample Solution

When your program is finished, please view a sample solution of this program to compare your approach to that one.

You should work to complete this checkpoint program first, without looking at the sample solution. However, if you have worked on it for at least an hour and are still having problems, you may feel free to use the sample solution to help you finish your program.

Testing Procedure

Verify that your program works correctly by following each step in this testing procedure:

Test your program with these values and ensure you arrive at the decision indicated:

  1. Loan size: 8, Credit: 7, Income: 8, Down Payment: 1, Decision: "yes"

  2. Loan size: 5, Credit: 2, Income: 7, Down Payment: 5, Decision: "yes"

  3. Loan size: 8, Credit: 2, Income: 8, Down Payment: 3, Decision: "no"

  4. Loan size: 2, Credit: 4, Income: 1, Down Payment: 7, Decision: "yes"

  5. Loan size: 4, Credit: 5, Income: 5, Down Payment: 3, Decision: "no"

Submission

When complete, please report your progress in the associated I-Learn quiz.