""" Write a function month_pay that has three parameters: total amount of the loan taken in the bank, the down payment, and the loan tearm (the number of YEARS the loan is taken for). The function returns the monthly payment - the amount user would need to pay every month to return the loan. For example, loan: $1200, down payment: $200, term: 1 year (pay attention it is 12 month!) then the monthly payment is $83.33 ((1200-200)/12) Write a function process, that has three parameters: list of loans, list of corresponding downpayments and the list of corresponding loan tearms. The function returns a new list - list of monthly payments. Use function month_pay to calculate monthly payment for each loan. Write main that reads a number of loans taken in the bank on specific day. The program then randomly generates three lists of integers: list of loans, list of downpayments and list of terms (use function make_list we wrote in the past). The program then uses function process to find monthly payments for each loan and finds the number of loans with monthly payments above $1000. """ import random def month_pay(loan,downpay,term): #finds monthly pay for ONE person only return (loan-downpay)/(term*12) def make_random_list(size, min_limit, max_limit): return [random.randint(min_limit, max_limit) for i in range(size)] def make_list_formatted(size, min, max): return [round(random.uniform(min,max),2) for i in range(size)] def process(loan_list, down_list, term_list): new_list=[] for i in range(len(loan_list)): new_list.append(round(month_pay(loan_list[i],down_list[i],term_list[i]),2)) return new_list def main(): loan=make_list_formatted(5,1000,2000) down=make_list_formatted(5,100,200) term=make_random_list(5,2,5) print("loans",loan) print("downpayments",down) print("terms",term) new_list=process(loan,down,term) print("monthly payments",new_list) count_500=0 for item in new_list: if(item>=500): count_500+=1 print(count_500,"users pay 500 or more per month") main()