For example, if the full cost of the procedure is 120 dollars, then patient pays 15 + 25*(120-15)/100 = 41.25 dollars insurance pays (120-15)*75/100 = 78.75 (which is 120-41.25)
Write a program that reads a number of the procedures done in one year. The program randomly generates the cost for each procedure and store all costs in the list. The program then calculates the patient portion and the insurance portion for each procedure. The results are stored in two separate lists. The program also finds the average amount patient paid for procedure and the total amount patient paid per year for all procedures, and the average amount insurance paid for procedure and the total amount insurance paid per year.
Example:
size 4, procedure_cost=[15, 50, 70, 156]
partient=[15, 23.75, 28.75, 50.25]
insurance=[0, 26.25, 41.25, 105.75]
average_patient=29.44
average_insurance=43.31
total_patient=117.75
total_insurance=173.25