TypeError Traceback (most recent call last)
Cell In[1], line 35
12 monthly_costs = {
13 “养老保险”: {
14 “个人”: base_salary * insurance_rates[“养老保险”][“个人”],
(…)
31 }
32 }
34 # 计算个人和单位每月总费用
—> 35 total_personal_cost = sum(monthly_costs[“养老保险”][“个人”],
36 monthly_costs[“医疗保险”][“个人”],
37 monthly_costs[“失业保险”][“个人”])
39 total_unit_cost = sum(monthly_costs[“养老保险”][“单位”],
40 monthly_costs[“医疗保险”][“单位”],
41 monthly_costs[“失业保险”][“单位”],
42 monthly_costs[“工伤保险”][“单位”],
43 monthly_costs[“公积金”][“单位”])
45 monthly_costs, total_personal_cost, total_unit_cost
TypeError: sum() takes at most 2 arguments (3 given)