TypeError Traceback (most recent call last)
Cell In[1], line 16
7 social_security_rates = {
8 “养老保险”: 0.08,
9 “医疗保险”: 0.02,
(…)
12 “生育保险”: 0.005
13 }
15 # 计算社保缴费总额
—> 16 social_security_payment = sum([base_salary * rate for base_salary, rate in social_security_rates.items()])
18 # 计算应纳税所得额
19 taxable_income = 10600 - social_security_payment - 5000
Cell In[1], line 16, in <listcomp>(.0)
7 social_security_rates = {
8 “养老保险”: 0.08,
9 “医疗保险”: 0.02,
(…)
12 “生育保险”: 0.005
13 }
15 # 计算社保缴费总额
—> 16 social_security_payment = sum([base_salary * rate for base_salary, rate in social_security_rates.items()])
18 # 计算应纳税所得额
19 taxable_income = 10600 - social_security_payment - 5000
TypeError: can’t multiply sequence by non-int of type ‘float’