'''
题目:企业发放的奖金根据利润提成。
利润(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)

  

 

最新文章

  1. C++设计模式-State状态模式
  2. MySQL 使用SELECT ... FOR UPDATE 做事务写入前的确认(转)
  3. 转: 带你玩转Visual Studio——带你理解多字节编码与Unicode码
  4. Scala underscore的用途
  5. Java从入门到精通——数据库篇之OJDBC版本区别
  6. week 与 strong区别 精辟的解释
  7. 自定义TabHost,TabWidget样式
  8. React+Redux学习笔记:React+Redux简易开发步骤
  9. IMLite轻量级即时通信工具开发指南
  10. [Swift]LeetCode11. 盛最多水的容器 | Container With Most Water
  11. c++ __declspec
  12. CentOS 7 MariaDB-MMM
  13. JS对象、数据类型区别、函数
  14. 【emWin】例程十五:触摸校准实例——五点校准法
  15. JavaSE笔记
  16. 全局组建封装(挂载到vue实例的原型中,通过this访问)
  17. CentOS7.5搭建Flask环境python3.6+mysql+redis+virtualenv
  18. canvas-圆弧形可拖动进度条
  19. English trip -- VC(情景课)4 C My feet hurt 我脚痛
  20. Linux网络(一)

热门文章

  1. jQuery实现鼠标选中文字后弹出提示窗口效果
  2. 转:windows 下 netsh 实现 端口映射(端口转发)
  3. linux,shell脚本中获取脚本的名字,使用脚本的名字。
  4. 了解 Go 1.9 的类型别名
  5. CreateEvent和SetEvent及WaitForSingleObject的使用方法
  6. Mac下,如何把项目托管到Github上(Github Desktop的使用)
  7. ionic 下拉刷新,上拉加载更多
  8. linux 添加交换分区
  9. background-clip和background-origin
  10. ajax 跨域访问 :Access-Control-Allow-Origin