185k views
5 votes
Our bank needs a tool that will help us in determining credit worthiness of loan applicants. We will enter the following information to Credit Assist program:

- Monthly Income (income) -

Total Debt (debt) -
Monthly minimum payments for the debt (minPay)

If total debt is more than 6 months monthly income of the applicant (income*6), we cannot grant any loan. Inform user that no loan can be granted. Otherwise, you subtract the minimum monthly debt payment from monthly income. We can allow up to 30% of that amount as loan. credit = (income - minPay) * 0.3

Let user know that the applicant can be approved for upto this (credit) amount.

User Knalj
by
5.5k points

1 Answer

3 votes

Answer:

income = float(input("Monthly Income: "))

debt = float(input("Total Debt: "))

minPay = float(input("Monthly minimum payments for the debt: "))

credit = 0

if debt > (income * 6):

print("No loan can be granted!")

else:

credit = (income - minPay) * 0.3

print("You can be approved for upto $" + str(credit))

Step-by-step explanation:

*The code is in Python

Ask the user for income, debt, and minPay

Check if the debt is greater than income * 6. If it is, print that no loan can be given. Otherwise, Calculate the credit amount using the given formula and print it

User Gutblender
by
5.4k points