β back to unit
Medium
# breaking it down medium
The Lemonade Ledger
Your lemonade stand closed for the day β time for real accounting. π
You get the cups sold each hour, the price you charge per cup, and what each cup costs you to make. Print three lines: revenue <total earned>, cost <total spent>, profit <the difference>.
Example:
Input: cups = [12, 8, 15, 5], price = 3, costs = 1
Output:
revenue 120
cost 40
profit 80
Total cups sold is 40. Revenue is 40 Γ 3 = 120, cost is 40 Γ 1 = 40, and profit is 120 - 40 = 80.
π‘ need a hint?
brk-lemonade-ledger.pyπ given lines are locked β write your code in between
loading...