-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask4.3h.py
22 lines (21 loc) · 827 Bytes
/
task4.3h.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
loanAmount=int(input("enter your laon amount:"))
age=int(input("enter your age:"))
monthlyIncome=int(input("enter your monthly income:"))
employmentStatus=input("enter your employment status(employed/unemployed):")
creditScore=int(input("enter your credit score:"))
outstandingLoan=input("enter your outstanding loan(yes/no):")
reasons=""
if age<=18:
reasons+="Not old enough,"
if monthlyIncome<loanAmount/12:
reasons+=" Insufficent income,"
if employmentStatus=="unemployed":
reasons+=" Unemployed,"
if creditScore<350 or creditScore>800:
reasons+=" Credit score out of acceptable range,"
if outstandingLoan=="yes":
reasons+=" You have an outstanding loan"
if reasons=="":
print("Congratulations! You are eligible for a loan")
else:
print(f"sorry, you're not eligible for a loan Reasons:"+reasons)