中级
存货加权平均法
未完成
中级参考
代码结构已给出,请填写 ____ 处
def solve(____):
total_cost = beginning["____"] + sum(____)
total_quantity = beginning["____"] + sum(____)
avg_price = total_cost / total_quantity
issued_cost = issued * avg_price
ending_cost = total_cost - issued_cost
return {"____": round(____), "____": round(____), "____": round(____)}
示例
输入
solve({"cost": 10000, "quantity": 100}, [{"cost": 22000, "quantity": 200}, {"cost": 16500, "quantity": 150}], 300)
期望输出
{'加权平均单价': 107.78, '发出成本': 32333.33, '期末成本': 16166.67}
👑
升级 VIP
解锁全部题目,畅通无阻地学习
- ✓ 解锁全部训练包所有题目
- ✓ 查看完整参考代码和提示
- ✓ 浏览器内直接运行 Python 代码
- ✓ 自动批改 + 进度追踪
30天
¥18
1年
¥99
2年
¥158
3年
¥199