Skip to content

Commit c7a7a0a

Browse files
committed
update
1 parent 04264d3 commit c7a7a0a

3 files changed

Lines changed: 191 additions & 0 deletions

File tree

md/奖金梯度计算.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
3+
```python
4+
#奖金奖励分级梯度
5+
arr=[1000000,600000,400000,200000,100000,0]
6+
rat=[0.01,0.015,0.03,0.03,0.05,0.075,0.1]
7+
while True:
8+
i=input("碳排放量:")
9+
if i=='q':
10+
exit(0)
11+
if not i.isdigit():
12+
continue
13+
reward=[]
14+
print("奖金额为:",end='')
15+
I=int(i)
16+
for idx in range(1,6):
17+
if I>arr[idx]:
18+
reward.append((I-arr[idx])*rat[idx])
19+
I=arr[idx]
20+
reward.reverse()
21+
if(len(reward))==1:
22+
print(reward[0])
23+
else:
24+
print("+".join([str(num) for num in reward]),"=",sum(reward))
25+
```

md/折线+柱状图.md

Lines changed: 87 additions & 0 deletions
Large diffs are not rendered by default.

md/饼状图.md

Lines changed: 79 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)