calculator.py python
6 lines 179 B
Raw
sha256:1141db9cac07a2646be40c7250ca5c7e920c4d0f62a1efcbf1b83a95be1f972f Initial commit: Build With Muse — Season 1 scaffolding + ep… Sonnet 5 patch 17 hours ago
1 def calculate_total(items):
2 return sum(item["price"] for item in items)
3
4 if __name__ == "__main__":
5 cart = [{"price": 10}, {"price": 15}]
6 print(calculate_total(cart))
File History 1 commit
sha256:1141db9cac07a2646be40c7250ca5c7e920c4d0f62a1efcbf1b83a95be1f972f Initial commit: Build With Muse — Season 1 scaffolding + ep… Sonnet 5 patch 17 hours ago