Advertisement
estefani-adriano

Credit assessment for INTEREST-FREE property financing! PYTHON

Oct 19th, 2023
1,622
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.00 KB | Software | 0 0
  1. #credit assessment for INTEREST-FREE property financing - PYTHON
  2.  
  3. print('-=-=' *15)
  4. print('     CREDIT ASSESSMENT FOR INTEREST-FREE PROPERTY FINANCING!')
  5. print('-=-=' *15)
  6. property = float(input('What is the value of the property? '))
  7. salary = float(input('How much is your salary? US$ '))
  8. years = int(input('How many years do you intend to pay for the property? '))
  9. print('-=-=' *15)
  10.  
  11. color = {'red' : '\033[4;31m', 'green' : '\033[4;32m', 'nothing' : '\033[m'}
  12. percentage= salary * 0.30
  13. month= years * 12
  14. value= property / month
  15.  
  16. if value <= percentage:
  17.     print('{}Credit analysis RELEASED!{}'.format(color['green'], color['nothing']))
  18.     print('Value: US$ {:.2f} \nMonth: {}'.format(value, month))
  19. elif value > percentage:
  20.     print('{}Credit analysis DENIED!{}'.format(color['red'], color['nothing']))
  21.     print('The installments exceed 30% of your salary!')
  22.     print('30% of your salary: R$ {}'.format(percentage))
  23.     print('Value: US$ {:.2f}'.format(value))
  24.    
  25. #by Estéfani =D
  26.    
Tags: python
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement