File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 11#Write a program to approve a bank loan for the purchase of a house. Ask the buyer for the value of the house, the
22# buyer's salary and in how many years he will pay it off. The monthly payment cannot exceed 30% of the salary or
33# else the loan will be denied.
4+
45house = float (input ('What is the value of the house you want to buy in R$:' ))
56salary = float (input ('What is your salary in R$:' ))
67time = float (input ('How many years do you want to pay off the house?' ))
78installment = house / (time * 12 )
89condition = salary * 0.30
9- print (f'To pay for a house R${ house } in { time } years.' )
10- print (f'The installment will be of R${ installment } .' )
10+ print (f'To pay for a house R${ house :.2f } in { time :.0f } years.' )
11+ print (f'The installment will be of R${ installment :.2f } .' )
1112if installment <= condition :
1213 print ('Congratulations your loan was approved!' )
1314else :
1415 print ('Try adding one more income.' )
1516
1617'''
17- # code "V
18+ # code my friend "V
1819house = float(input('House value (R$): '))
1920salary = float(input('Salary (R$): '))
2021time = int(input('Years to pay: '))
You can’t perform that action at this time.
0 commit comments