Bake Sale Takings
Data questions · Intermediate · about 6 min
bake_sale.csv lists each item at the school bake sale with its price and how many were sold. Add a column for the money each item raised (its price times the number sold), then set answer to the total money the whole sale raised.
Example
The first lines of bake_sale.csv:
item,price,sold brownie,3,24 cupcake,2,40
bake_sale.csv · 8 rows
| item | price | sold |
|---|---|---|
| brownie | 3 | 24 |
| cupcake | 2 | 40 |
| cookie | 1 | 65 |
| banana bread | 4 | 12 |
| lemon tart | 5 | 9 |
| flapjack | 2 | 31 |
| cheese scone | 3 | 18 |
| fruit muffin | 2 | 27 |
import pandas as pd
df = pd.read_csv("bake_sale.csv")
answer = None
The solution opens after your first Check.