TypeError Traceback (most recent call last)
Cell In[1], line 12
1 # 社保基数12200元,假设养老保险费率为20%,医疗保险费率为10%,失业保险费率为0.5%,工伤保险费率为0.2%,生育保险费率为0.5%。
2
3 # 计算社保总缴费
4 social_security_rate = {
5 ‘养老保险’: 0.20,
6 ‘医疗保险’: 0.10,
(…)
9 ‘生育保险’: 0.005
10 }
—> 12 total_social_security_payment = sum([base * rate for base, rate in social_security_rate.items()])
13 total_social_security_payment
Cell In[1], line 12, in <listcomp>(.0)
1 # 社保基数12200元,假设养老保险费率为20%,医疗保险费率为10%,失业保险费率为0.5%,工伤保险费率为0.2%,生育保险费率为0.5%。
2
3 # 计算社保总缴费
4 social_security_rate = {
5 ‘养老保险’: 0.20,
6 ‘医疗保险’: 0.10,
(…)
9 ‘生育保险’: 0.005
10 }
—> 12 total_social_security_payment = sum([base * rate for base, rate in social_security_rate.items()])
13 total_social_security_payment
TypeError: can’t multiply sequence by non-int of type ‘float’