Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.62 KB | None | 0 0
  1. x = float(input('Please enter the intrest amount: '))
  2. x= x/100
  3.  
  4. l = int(input('Please enter the loan amount: '))
  5. t = int(input('Please enter the term(years): '))
  6. e = l * x * t
  7. h = l + e
  8.  
  9.  
  10.  
  11. o = t * 12
  12. i = h / o
  13. a = 0
  14.  
  15. print('\nThe loan amount: %.2f .' %(l))
  16. print('The term(years): %d .' %(t))
  17. print('The intrest to be paid is %.2f .' %(e))
  18. print('The final amount to be paid: %.2f \n' %(h))
  19.  
  20. print('Payment #        Remaining Balance     Amount Paid')
  21. print('--------       ---------------      -----------')
  22. while h != 0:
  23.     if h < 1:
  24.         break
  25.     else:
  26.         a = a + 1
  27.         print(str(a)+'           %.2f           %.2f '%(h, i))
  28.         h = h - i
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement