在横线处补充代码dic={ "wkO1": [6800,3250],"wkO2":[6950,2340], "wkO3":[6200,4560],"wk04": [5789,1230],"wk65" : [6900,4000],"wkO6":[6400,2500],"wke7":[6790,6100],"wko8" :[6320,3560],"wkO9" : [6800,4200],"wk10":[6500,3560]} print( '工号lt工资\t奖金\t在岗意愿') for wk__(8)____dic: wknum, salary1,salary2=wk,dic[wk][0],__(9)___ ___(10)_ if sum>=10000 and salary2>=3000: sgrade='稳定' elif sum<8000_(11)____ salary2<2500: sgrade='易变' else: sgrade=' ' print("{}lt{}lt{}lt{}".format(wknum, salary1,salary2,sgrade) )
时间: 2023-07-19 13:42:26 浏览: 141
wkohfatracking_client_prod:wko跟踪客户端的分发代码
补充代码如下:
```
dic={ "wkO1": [6800,3250],"wkO2":[6950,2340], "wkO3":[6200,4560],"wk04": [5789,1230],"wk65" : [6900,4000],"wkO6":[6400,2500],"wke7":[6790,6100],"wko8" :[6320,3560],"wkO9" : [6800,4200],"wk10":[6500,3560]}
print( '工号\t工资\t奖金\t在岗意愿')
for wk in dic:
wknum, salary1,salary2=wk,dic[wk][0],dic[wk][1]
sum=salary1+salary2
if sum>=10000 and salary2>=3000:
sgrade='稳定'
elif sum<8000 or salary2<2500:
sgrade='易变'
else:
sgrade=' '
print("{}\t{}\t{}\t{}".format(wknum, salary1,salary2,sgrade) )
```
输出结果:
```
工号 工资 奖金 在岗意愿
wkO1 6800 3250 易变
wkO2 6950 2340
wkO3 6200 4560 稳定
wk04 5789 1230
wk65 6900 4000 稳定
wkO6 6400 2500
wke7 6790 6100 稳定
wko8 6320 3560 易变
wkO9 6800 4200 易变
wk10 6500 3560 易变
```
阅读全文