Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- Part 3: Loan
- By Mark Wu 3217
- '''
- import WorkSheet, WorkSheet2
- total_amount = float(input("Enter loan amount: "))
- annual_ir = float(input("Enter annual interest rate (percent): "))
- duration = int(input("Enter loan duration in years: "))
- monthly_payment = WorkSheet.calculateMonthlyPayment(total_amount, annual_ir, duration)
- print('LOAN AMOUNT: {} INTEREST RATE(PERCENT): {}'.format(int(total_amount), int(annual_ir)))
- print('DURATION(YEARS): {} MONTHLY PAYMENT: {}'.format(int(duration), int(monthly_payment)))
- for index in range(duration):
- year = index + 1
- remain_balance = WorkSheet2.calculateRemainingLoanBalance(total_amount, annual_ir, duration, year * 12)
- print('YEAR: {} BALANCE: {} TOTAl PAYMENT: {}'.format(year, int(remain_balance), int(monthly_payment * year * 12)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement