Question: Your task is to write a program that will calculate the loan payment given information provided by the user about a loan they would like
Your task is to write a program that will calculate the loan payment given information provided by the user about a loan they would like to take out. The user will provide the amount of the loan, the annual interest rate, the payoff period, and how frequently they would like to make payments. You will use the information they provide to produce a summary of their loan that includes the starting balance, the number of payments they will make, the discount factor, the size of each payment, the total amount they will pay over the length of the loan, and the total amount they paid to the bank in interest.
The website https://www.thebalance.com/loan-payment-calculations-315564 provides a nice explanation of how to do the calculation.
Your program must make use of functions. These are the functions your program must have:
def calc_periodic_interest_rate(annual_rate,payment_count):
calculate the interest rate per payment, given the annual interest rate and the number of payments per year they will make
def get_payments_per_year(frequency):
This function will return the number of payments per year based on whether frequency is a, s, q, m, or d.
def calc_discount_factor(per_int_rate, pay_count):
This function will return the discount rate, calculated as shown on the website, given the periodic interest rate and the total number of payments.
def calc_payment(amount, discount_factor):
This function will return the amount of each payment, calculated as shown on the website, given the amount of the loan and the discount_factor.
def print_summary(amount, payment_count, disc_fact, payment):
This function prints a nicely formatted summary of the loan given the original amount of the loan, the number of payments to be made, the discount factor, and the payment. The summary will include the total payment and the amount of interest paid, and it will look like what is shown in the sample output below.

Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
