```python # 输入入职年限和销售业绩 years_of_service = int(input("请输入入职年限: ")) sales_performance = float(input("请输入销售业绩: ")) # 初始化奖金比例和奖金 bonus_ratio = 0 bonus = 0 # 根据条件计算奖金比例和奖金 if years_of_service > 5: if sales_performance > 15000: bonus_ratio = 0.2 elif sales_performance > 10000: bonus_ratio = 0.15 elif sales_performance > 5000: bonus_ratio = 0.1 else: bonus_ratio = 0.05 else: if sales_performance > 4000: bonus_ratio = 0.045 else: bonus_ratio = 0.01 bonus = sales_performance * bonus_ratio # 将奖金添加到列表中 bonus_list = [bonus] # 输出奖金比例和奖金 print("奖金比例: ", bonus_ratio) print("奖金: ", bonus) print("奖金列表: ", bonus_list) ``` [2024-11-07 01:00:11 | AI写代码神器 | 264点数解答]