PHP前端开发

Python实现的个人所得税计算器

百变鹏仔 3小时前 #Python
文章标签 个人所得税

这篇文章主要介绍了python实现的个人所得税计算器,涉及python条件判断与数值运算相关操作技巧,需要的朋友可以参考下

本文实例讲述了Python实现的个人所得税计算器。分享给大家供大家参考,具体如下:

# -*- coding: utf-8 -*-"""Created on Sat Apr 15 17:55:54 2017@author: Administrator"""#!/bin/env python# author: zhouhh# email: ablozhou@gmail.com# money.pydef money(all_salary,has_welfare,has_housing_fund):  money = all_salary  bj_average_salary=3322;#in 2008 using average salary of year 2007  min = bj_average_salary*0.6  max = bj_average_salary*3  welfare_fund = all_salary  if all_salary &gt; max:    welfare_fund = max  if all_salary <p></p><p>运行结果:</p><pre class="brush:php;toolbar:false;">total money=10000.00all welfare fund=0.00before tax money =10000.00you are in level 4,tax =1225.00, you own money=8775.00