WINNIPEG
发表于 2018-1-4 11:31:49
temp=input('please input profit_number:')
profit_number=int(temp)
bonus=0
if 0< profit_number<=100000:
bonus=profit_number*0.1
elif 100000<profit_number<=200000:
bonus=10000+(profit_number-100000)*0.075
elif 200000<=profit_number<400000:
bonus=17500+(profit_number-200000)*0.05
elif 400000<=profit_number<600000:
bonus=17500+10000+(profit_number-400000)*0.03
elif 600000<=profit_number<1000000:
bonus=17500+10000+6000+(profit_number-600000)*0.015
elif profit_number>=1000000:
bonus=17500+10000+6000+6000+(profit_number-1000000)*0.01
print('bonus=',bonus)
新手刷题
有鼻泡的犀牛
发表于 2018-1-16 20:55:09
a = int(input("请输入利润"))
income =
count=
sum = 0
flag = True
for i in range(0,6):
if (a > income and flag):
sum = (a - income) * count
flag = False
sum += count * income
print(sum)
wojiaodabai
发表于 2018-1-17 10:58:25
num=input('please input num:(万元)')
i=int(num)
def countReward(i):
if i<=10:
reward=0.1*i
elif i>=10 and i<=20:
reward=0.1*10+ (i-10)*0.075
elif i>=20 and i<=40:
reward=0.1*10+ 10*0.075 + (i-20)*0.05
elif i>=40 and i<=60:
reward=0.1*10+ 10*0.075 + 20*0.05+(i-40)*0.03
elif i>=60 and i<=100:
reward=0.1*10+ 10*0.075 + 20*0.05+20*0.03+(i-60)*0.015
else:
reward=0.1*10+ 10*0.075 + 20*0.05+20*0.03+40*0.015+(i-100)*0.01
return reward
print(reward)
countReward(i)
sddage
发表于 2018-1-17 13:55:09
temp=input("please input i:>>")
i=int(temp)
count=0
if i>1000000:
up=i-1000000
count=count+up*0.01
i=i-up
if i>600000:
up=i-600000
count=count+up*0.015
i=i-up
if i>400000:
up=i-400000
count=count+up*0.03
i=i-up
if i>200000:
up=i-200000
count=count+up*0.05
i=i-up
if i>100000:
up=i-100000
count=count+up*0.075
i=i-up
else:
count=count+i*0.1
print(count)
昕姐姐
发表于 2018-1-19 13:39:07
profit = int(input('净利润:'))
standard =
ratio =
sum = 0
for i in range(0,6):
if profit > standard:
sum +=((profit - standard) * ratio)
profit= standard
print(sum)
塔利班
发表于 2018-1-19 13:54:18
好多人利润都算错了,没算其他档位应该计算的,看来是准备中饱私囊{:5_106:}
1141429506
发表于 2018-1-24 21:39:35
lirun=input('你的利润为(万元)')
lr=eval(lirun)
def jj(lr):
if(lr<=10):
jj=lr*0.1
elif(10<lr<20):
jj=0.1*10+(lr-10)*0.075
elif(20<=lr<30):
jj=0.1*10+10*0.075+(lr-20)
return jj
print('恭喜你,你的奖金为',jj(lr),'万元')
没写完同理吧,比较啰嗦
bobfenglin
发表于 2018-1-26 10:58:31
本帖最后由 bobfenglin 于 2018-1-26 11:00 编辑
i=float(input('请输入利润金额:'))
if i>1000000: bonus = 39500.0+(i-1000000)*0.01
elif 600000<i<=1000000: bonus=33500.0+(i-1000000)*0.015
elif 400000<i<=600000: bonus=27500.0+(i-400000)*0.03
elif 200000<i<=400000: bonus=17500.0+(i-200000)*0.05
elif 100000<i<=200000: bonus=17500.0+(i-100000)*0.075
elif 0<i<=100000: bonus=i*0.1
else:
print('输入错误啦')
try :
print('你所得的奖金是%f'%bonus)
except:
print('就是不给你')
lin193556271
发表于 2018-1-26 13:34:30
I =int(input('当月利润是(万元):'))
Q = int
if I <=10:
Q = I * 0.1
elif 10 < I <20:
Q =(10-(20-I)) * 10% + (I-10)*0.075
elif 20 < I <40:
Q = I * 0.05
elif 40 < I < 60:
Q = I* 0.03
elif 60 < 100:
Q = I *0.015
elif I >=100:
Q = I * 0.01
print('可以分到的奖金是:',Q,'万元')
z1446773686
发表于 2018-2-6 17:43:34
def profits(math):
if(math > 0 and math <= 10**5):
math = math * 0.1
elif(math > 10**5 and math <= 2*10**5):
math = 10**5 * 0.1 + (math - 10**5) * 0.075
elif(math > 2*10**5 and math <= 4*10**5):
math = 10**5 * 0.1 + 2 * 10**5 * 0.075 + (math - 2*10**5) * 0.05
elif(math > 4 * 10**5 and math <= 6 * 10**5):
math = 10**5 * 0.1 + 2 * 10**5 * 0.075 + 4 * 10**5 * 0.05 + (math - 4*10**5) * 0.03
elif(math > 6 * 10**5 and math <= 10**6):
math = 10**5 * 0.1 + 2 * 10**5 * 0.075 + 4 * 10**5 * 0.05 + 6 * 10**5 * 0.03 \
+ (math - 6*10**5) * 0.015
elif(math > 10**6):
math = 10**5 * 0.1 + 2 * 10**5 * 0.075 + 4 * 10**5 * 0.05 + 6 * 10**5 * 0.03 \
+ (math - 10**6) * 0.01
return math
def F_T(number):
while(not number.isdigit()):
number = input('请重新输入整形数值:')
number = int(number)
return number
while(' '):
math = profits(F_T(number = input('请输入利润总值:')))
print('月终奖金总额为:%d 元人民币' % math)
ultraji
发表于 2018-2-18 21:23:13
t = (1000000,600000,400000,200000,100000,0)
bili = (0.01, 0.015, 0.03, 0.05, 0.075, 0.1)
pu = int(input())
jiangjin = 0
for i in range(0,6):
if pu > t:
jiangjin += (pu - t) * bili
pu = t
print(jiangjin)
lchelement
发表于 2018-2-24 21:23:22
本帖最后由 lchelement 于 2018-2-24 21:25 编辑
i = int(input('请输入本月利润:'))
if i<= 100000:
bonus =i*0.1
elif 100000< i <= 200000:
bonus = (i-100000)*0.75+10000
elif 200000<i<=400000:
bonus = 17500+(i-200000)*0.05
elif 400000<i<=600000:
bonus = 27500+(i-400000)*0.03
elif 600000<i<=1000000:
bonus = 33500+(i-600000)*0.015
else:
bonus = 39500+(i-1000000)*0.01
print('你当月奖金为 %d'%bonus)
victor.xu
发表于 2018-3-1 13:44:37
def bonus(I):
if I <= 10:
return 0.1 * I
elif 10 < I <= 20:
return 1 + 0.075 * (I - 10)
elif 20 < I <= 40:
return 1.75 + 0.05 * (I - 20)
elif 40 < I <= 60:
return 2.75 + 0.03 * (I - 40)
elif 60 < I <= 100:
return 3.35 + 0.015 * (I - 60)
elif I > 100:
return 3.95 + 0.01 * (I - 100)
瞬秒爆加速
发表于 2018-3-2 15:09:15
I = int(input("请输入当月利润>>"))
#利润率
rat =
#利润分段区间
arr =
#利润分段峰值
wage =
#个分段达到峰值的奖金
lr =
#利润超过峰值计算
for i in range(len(wage)-1,-1,-1):
#判断当月利润超过哪个峰值
if I>wage:
#打印给分段利润的总奖金
for iiii in range(i):
print(sum(lr[:iiii+1]))
#打印总奖金
print((I-wage)*rat+sum(lr[:i]))
break
else:
continue
benzhj
发表于 2018-3-7 14:48:47
i =(input ("净利润:"))
i = int (i)
v = 0.0
if i > 1000000:
v += (i-1000000)*0.01
i -= (i-1000000)
if i > 600000:
v += (i-600000)*0.015
i -= (i-600000)
if i > 400000:
v += (i-400000)*0.03
i -= (i-400000)
if i > 200000:
v += (i-200000)*0.05
i -= (i-200000)
if i >100000:
v += (i-100000)*0.075
i -= (i-100000)
if i > 0:
v += i*0.1
print ("我的答案是:\n{0}".format (v))
看着挺容易的,做了好久才搞好............
tusumili
发表于 2018-3-11 16:08:55
本帖最后由 tusumili 于 2018-3-11 16:44 编辑
#如果当月利润小于等于标准利润10万元的时候,利润乘以1%,就是当月应发奖金的总数
if profit <= standard:
#奖金等于利润乘以提成
bonus = profit * commission
#利润高于10万元,低于等于20万元时,低于10万元的部分按10%提成,高于10万元的部分,可提成7.5%
if standard < profit <= standard:
#也就是利润减去10万元,
profit = profit - standard
print(profit)
#这10万元将乘以百分之一并且暂时存储在temporary当中,
temporary = standard * commission
print(temporary)
#所以奖金就等于高于十万元的利润乘以0.075并加上之间的temporary
bonus = (profit * commission) + temporary
print(bonus)
tusumili
发表于 2018-3-11 18:53:40
#获取当月利润
#因为input获得数据类型为整形,所以需要int进行转换
profit = int(input('净利润:'))
#标准为10万、20万、40万、60万、100万
standard =
#提成为10%、7.5%、5%、3%、1.5%、1%
commission =
#奖金为bonus
bonus = 0
for x in range(0,6):
# 第一次判断利润是否大于100万
# 第二次判断利润是否大于60万
# 如果判断利润大于60万,则开始计算,
if profit > standard:
#如果判断大于60万,奖金开始计算,第一次计算利润减去60万乘以0.015,得出的结果是大于60万的部分
#然后算出剩下的利润,也就是将60万赋值给利润
#然后继续计算,利润减去40万乘以0.03,以此类推
#每一次计算完毕后,奖金都需要加上得出的结果,最后进行打印
bonus += (profit - standard) * commission
profit = standard
print(bonus)
半死不活的咸鱼
发表于 2018-3-16 01:11:36
# -*- coding:utf-8 -*-
x = float(input('请输入当月利润:\n'))
i = x/10000
if i <= 10:
j = 0.1*i
elif 10<i<20:
j = 1 +(i-10)*0.075
elif 20<i<40:
j= 1.75+(i-20)*0.05
elif 40<i<60:
j= 2.75+(i-40)*0.03
elif 60<i<100:
j= 3.35+(i-60)*0.015
elif 100<i:
j= 3.95+(i-100)*0.01
print(j*10000)
半死不活的咸鱼
发表于 2018-3-16 01:12:15
半死不活的咸鱼 发表于 2018-3-16 01:11
# -*- coding:utf-8 -*-
x = float(input('请输入当月利润:\n'))
i = x/10000
新手粗暴式.....
hjnnjh
发表于 2018-3-23 21:50:34
temp = input('请输入利润:')
I = int(temp)
if (I <= 100000):
bonus = I * 0.1
elif (I > 100000) and (I <= 200000):
bonus = 10000 + (I - 100000) * 0.075
elif (I > 200000) and (I <= 400000):
bonus = 10000 + 7500 + (I - 200000) * 0.05
elif (I > 400000) and (I <= 600000):
bonus = 10000 + 7500 + 10000 + (I - 400000) * 0.03
elif (I > 600000) and (I <= 1000000):
bonus = 10000 + 7500 + 10000 + 6000 + (I - 600000) * 0.015
elif (I > 1000000):
bonus = 10000 + 7500 + 10000 + 6000 + 6000 + (I - 1000000) * 0.01
print('应发的奖金为:%d'%bonus)