Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that will decide whether a customer can borrow a desired amount of money from the bank. Program asks for the following information

Write a program that will decide whether a customer can borrow a desired amount of money from the bank. Program asks for the following information (given in the starter file):

  1. income (float): Amount the customer earns in a year.
  2. credit (float): Amount of money customer wants to borrow.
  3. time (integer): Number of years to pay the money back.

You need to write messages in the console window according to the following criteria:

  1. Customers can borrow money for at least 1 year, at most 5 years.
  2. If the yearly income of the customer is less than 60000 TL, s/he is rejected immediately.
  3. If the yearly income of the customer is more than or equal to 60000 TL, then:
    1. If the loan divided by the number of years is less than half of the customers yearly income, then the customer can take the loan.
    2. Otherwise, s/he is rejected

Sample outputs:

Amount of income per year: 100000

Amount of credit: 80000

Number of years to pay back: 3

You can borrow 80000.0 TL for 3 year(s).

Amount of income per year: 100000

Amount of credit: 80000

Number of years to pay back: 1

You cannot borrow 80000.0 TL for 1 year(s).

Amount of income per year: 80000

Amount of credit: 20000

Number of years to pay back: 1

You can borrow 20000.0 TL for 1 year(s).

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

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions