Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #credit assessment for INTEREST-FREE property financing - PYTHON
- print('-=-=' *15)
- print(' CREDIT ASSESSMENT FOR INTEREST-FREE PROPERTY FINANCING!')
- print('-=-=' *15)
- property = float(input('What is the value of the property? '))
- salary = float(input('How much is your salary? US$ '))
- years = int(input('How many years do you intend to pay for the property? '))
- print('-=-=' *15)
- color = {'red' : '\033[4;31m', 'green' : '\033[4;32m', 'nothing' : '\033[m'}
- percentage= salary * 0.30
- month= years * 12
- value= property / month
- if value <= percentage:
- print('{}Credit analysis RELEASED!{}'.format(color['green'], color['nothing']))
- print('Value: US$ {:.2f} \nMonth: {}'.format(value, month))
- elif value > percentage:
- print('{}Credit analysis DENIED!{}'.format(color['red'], color['nothing']))
- print('The installments exceed 30% of your salary!')
- print('30% of your salary: R$ {}'.format(percentage))
- print('Value: US$ {:.2f}'.format(value))
- #by Estéfani =D
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement