I was asked to calculate the average insurance costs for the Medical Insurance Project. I am not sure why my function doesn’t work, could someone please help? Thanks!
total_insurance_costs = 0
for record in insurance_costs:
total_insurance_costs += float(record)
average_insurance_costs = total_insurance_costs/len(insurance_costs)