-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path02-If_statement.py
More file actions
36 lines (29 loc) · 946 Bytes
/
02-If_statement.py
File metadata and controls
36 lines (29 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# excercise 1
'''price of a house is $1M
if buyer has good credit
they need to put down 10%
otherwise
20%
print the down payment
'''
# price = 1000000
# credit_score = int(input("Enter credit score between 0 to 100 "))
# if credit_score > 30:
# down_pay = 0.1 * price
# else:
# down_pay = 0.2 * price
# print(f"your down payment is ${down_pay}" )
# EXCERCISE 2
'''High income AND good credit
Eligible for loan'''
# income = int(input("enter income "))
# credit = int(input("Enter credit score "))
# criminal_record = input("Are you a criminal ")
# if income > 10000 and credit > 30 and criminal_record.lower() == 'no':
# print("Congratulations !! you are eligible ")
# elif criminal_record.lower() == 'yes':
# print("You can not get a loan ")
# elif income <= 10000:
# print("Oops ! your income is too low for this loan")
# elif credit <= 30:
# print("Oops ! You must increase your credit score")