TypeError Traceback (most recent call last)
Cell In[1], line 18
9 social_security_rates = {
10 ‘养老保险’: 0.08,
11 ‘医疗保险’: 0.02,
(…)
14 ‘生育保险’: 0.005
15 }
16 accumulation_fund_rate = 0.12
—> 18 total_social_security = sum(salary * rate for salary, rate in social_security_rates.items())
19 total_accumulation_fund = 15200 * accumulation_fund_rate
21 # 计算应纳税所得额
Cell In[1], line 18, in <genexpr>(.0)
9 social_security_rates = {
10 ‘养老保险’: 0.08,
11 ‘医疗保险’: 0.02,
(…)
14 ‘生育保险’: 0.005
15 }
16 accumulation_fund_rate = 0.12
—> 18 total_social_security = sum(salary * rate for salary, rate in social_security_rates.items())
19 total_accumulation_fund = 15200 * accumulation_fund_rate
21 # 计算应纳税所得额
TypeError: can’t multiply sequence by non-int of type ‘float’