SHARE
TWEET

Untitled

a guest Oct 10th, 2019 92 in 3 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. bank_name = \
  2. [
  3.     'Metrobank',
  4.     'Security Bank',
  5.     'BPI',
  6.     'Eastwest',
  7.     'RCBC Savings',
  8.     'PNB Sure wheels',
  9.     'Chinabank',
  10.     'Union Bank'
  11. ]
  12.  
  13. vehicle_type = \
  14. [
  15.     'Brandnew',
  16.     'Pre-owned'
  17. ]
  18.  
  19. loan_term = [60, 48, 36]
  20. vehicle_price = [120000, 300000, 450000]
  21. downpayment = [20, 30, 40]
  22.  
  23.  
  24.  
  25.  
  26.  
  27. '''Vehicle Type'''
  28. for type in range(len(vehicle_type)):
  29.     print str(type+1) + '.) ' + vehicle_type[type]
  30. input_vehicle_type = input('\n[*]Enter Vehicle type---')
  31. vehicle_type = vehicle_type[input_vehicle_type - 1]
  32.  
  33. print
  34.  
  35. '''Bank Name'''
  36. for bank in range(len(bank_name)):
  37.     print str(bank+1) + '.) ' + bank_name[bank]
  38. input_bank_name = input('\n[*]Enter Bank name---')
  39. bank_name = bank_name[input_bank_name - 1]
  40.  
  41. print
  42.  
  43. '''Loan Term'''
  44. for loan in range(len(loan_term)):
  45.     print str(loan+1) + '.) ' + str(loan_term[loan]) + ' months'
  46. input_loan_term = input('\n[*]Enter Loan term---')
  47. loan_term = loan_term[input_loan_term - 1]
  48.  
  49. print
  50.  
  51. '''Vehicle Price'''
  52. for price in range(len(vehicle_price)):
  53.     print str(price+1) + '.) PHP ' + str(vehicle_price[price])
  54. input_vehicle_price = input('\n[*]Enter Vehicle price---')
  55. vehicle_price = vehicle_price[input_vehicle_price - 1]
  56.  
  57. print
  58.  
  59. '''Downpayment & Downpayment amount'''
  60. for payment in range(len(downpayment)):
  61.     print str(payment+1) + '.) ' + str(downpayment[payment]) + '%'
  62. input_downpayment = input('\n[*]Enter Downpayment---')
  63. downpayment = downpayment[input_downpayment - 1]
  64. if downpayment == 20: computed_downpayment = vehicle_price * .20
  65. elif downpayment == 30: computed_downpayment = vehicle_price * .30
  66. elif downpayment == 40: computed_downpayment = vehicle_price * .40
  67.  
  68. '''Loan amount'''
  69. loan_amount = vehicle_price - computed_downpayment
  70. loan_amount_output = 'Price(' + str(vehicle_price) + ')' + ' - ' + 'Down payment amount(' + str(computed_downpayment)+ ')' + ' = PHP' + str(loan_amount)
  71.  
  72. '''Interest rate'''
  73. if input_bank_name == 1: interest_rate = 4.79; interest_rate2 = 0.0479
  74. elif input_bank_name == 2: interest_rate = 5.07; interest_rate2 = 0.0507
  75. elif input_bank_name == 3: interest_rate = 5.36; interest_rate2 = 0.0536
  76. elif input_bank_name == 4: interest_rate = 5.83; interest_rate2 = 0.0583
  77. elif input_bank_name == 5: interest_rate = 5.05; interest_rate2 = 0.0505
  78. elif input_bank_name == 6: interest_rate = 5.35; interest_rate2 = 0.0535
  79. elif input_bank_name == 7: interest_rate = 5.39; interest_rate2 = 0.0539
  80. elif input_bank_name == 8: interest_rate = 5.61; interest_rate2 = 0.0561
  81.  
  82. '''Monthly amortization'''
  83. monthly_amortization_op1 = float(loan_amount) * interest_rate2
  84. monthly_amortization_op2 = str(monthly_amortization_op1 / 12)
  85. monthly_amortization = 'Loan amount(' + str(loan_amount) + ')' + ' x ' + 'Interest rate(' + str(interest_rate) + ')' + ' / 12 = ' + 'PHP ' + str(monthly_amortization_op2)
  86.  
  87. output = \
  88. {
  89.     'Vehicle type' : vehicle_type,
  90.     'Bank Name' : bank_name,
  91.     'Loan Term' : str(loan_term) + ' months',
  92.     'Vehicle Price' : 'PHP ' + str(vehicle_price),
  93.     'Downpayment' : str(downpayment) + '%',
  94.     'Downpayment amount' : str(downpayment) + '% of' + ' PHP ' + str(vehicle_price) + ' = PHP ' + str(computed_downpayment),
  95.     'Loan amount' : loan_amount_output,
  96.     'Interest rate' : str(interest_rate) + '%',
  97.     'Monthly amortization' : monthly_amortization
  98. }
  99.  
  100. print '\n\n\n--------Output--------\n'
  101. for element in output:
  102.     print element + ' : ' + output[element]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top