Question
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):
- income (float): Amount the customer earns in a year.
- credit (float): Amount of money customer wants to borrow.
- time (integer): Number of years to pay the money back.
You need to write messages in the console window according to the following criteria:
- Customers can borrow money for at least 1 year, at most 5 years.
- If the yearly income of the customer is less than 60000 TL, s/he is rejected immediately.
- If the yearly income of the customer is more than or equal to 60000 TL, then:
- 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.
- 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started