python分段算利润、税收
Python 分段 利润
2023-09-14 08:59:05 时间
''' 题目:企业发放的奖金根据利润提成。 利润(I)低于或等于10万元时,奖金可提10%; 利润高于10万元,低于20万元时,低于10万元的部分按10%提成,高于10万元的部分,可提成7.5%; 20万到40万之间时,高于20万元的部分,可提成5%; 40万到60万之间时高于40万元的部分,可提成3%; 60万到100万之间时,高于60万元的部分,可提成1.5%, 高于100万元时,超过100万元的部分按1%提成, 从键盘输入当月利润I,求应发放奖金总数? ''' # in_profit = int(input('净利润:')) in_profit = 1200000 profit = [1000000, 600000, 400000, 200000, 100000, 0] rate = [0.01, 0.015, 0.03, 0.05, 0.075, 0.1] total = 0 for index in range(0, 6): if in_profit > profit[index]: total = total + (in_profit - profit[index]) * rate[index] if index is 0: print("大于100万的奖金(1%) :" + str(total)) elif index is 1: print("加上60-100万的奖金(1.5%):" + str(total)) elif index is 2: print("加上40-60万的奖金(3%) :" + str(total)) elif index is 3: print("加上20-40万的奖金(5%) :" + str(total)) elif index is 4: print("加上10-20万的奖金(7.5%) :" + str(total)) elif index is 5: print("加上0-10万的奖金(10%%) :%s" % str(total)) in_profit = profit[index] print("总奖金:") print(total)
相关文章
- python+Eclipse+pydev环境搭建
- python生成word中文字体
- 用Python实现一个大数据搜索引擎
- python分段算利润、税收
- python: 安装DeOldify库:黑白图片上色(Python 3.7.15)
- python:pip升级pip本身和setuptools(Python 3.7.15)
- python 从灯塔国某大学的作业题到制作一个“围棋”程序
- Python语言学习:利用python获取当前/上级/上上级目录路径(获取路径下的最后叶目录的文件名、合并两个不同路径下图片文件名等目录/路径案例、正确加载图片路径)之详细攻略
- Python语言学习:在python中,如何获取变量的本身字符串名字而非其值/内容及其应用(在代码中如何查找同值的所有变量名)
- Python之tkinter:动态演示调用python库的tkinter带你进入GUI世界(Button展示图片事件)
- 已解决:pip安装第三模块(库)与PyCharm中不同步的问题(PyCharm添加本地python解释器)
- 〖Python接口自动化测试实战篇⑧〗- 小案例 - 使用python实现接口请求 [查询天行数据]
- 房屋千千万,如何找到便宜实惠的呢,python采集数据并做数据可视化~
- python迭代器高级例子
- 从零开始学python | 使用Python映射,过滤和缩减函数:所有您需要知道的
- Ubuntu下完美切换Python版,即设置系统默认的python版本(亲测有效)
- Python爬虫:网页字体加密与解密实践
- Python编程:命令行python和python -m的区别
- Python编程:利用ImageMagick转换PDF为图片并识别提取图表
- scvi doublets scvi去除双细胞 scvi.external.SOLO.from_scvi_model python 5
- python自动化测试学习-Python测试框架之unittest和pytest
- python 多线程
- 【Python】Visual Studio Code 安装&&使用 hello python~~~~
- Python kafka操作实例(kafka-python)
- Python数学计算工具3、Python 斐波那契数列-前500项列表
- Python基本数据类型——元组与字符串
- 老司机教你如何学习Python数据分析
- python使用技巧(三十三):多维列表list数据写入Excel的xlsx文件
- LeetCode:罗马数字转整数(Python版本)