TypeError Traceback (most recent call last)
Cell In[1], line 18
3 proportion = {
4 ‘养老保险’: {‘单位’: 0.16, ‘个人’: 0.08},
5 ‘失业保险’: {‘单位’: 0.006, ‘个人’: 0.004},
(…)
9 ‘生育保险’: 0
10 }
12 # 计算单位与个人缴费金额
13 unit_payment = {
14 ‘养老保险’: social_security_base * proportion[‘养老保险’][‘单位’],
15 ‘失业保险’: social_security_base * proportion[‘失业保险’][‘单位’],
16 ‘医疗保险’: social_security_base * proportion[‘医疗保险’][‘单位’],
17 ‘大病医疗’: 268,
—> 18 ‘工伤保险’: social_security_base * proportion[‘工伤保险’][‘单位’],
19 ‘生育保险’: 0
20 }
22 personal_payment = {
23 ‘养老保险’: social_security_base * proportion[‘养老保险’][‘个人’],
24 ‘失业保险’: social_security_base * proportion[‘失业保险’][‘个人’],
25 ‘医疗保险’: social_security_base * proportion[‘医疗保险’][‘个人’]
26 }
28 # 计算总金额
TypeError: ‘float’ object is not subscriptable