0 / 34

Invite others

Progress

0 / 34

Recipe Ingredient Scaler

📋 Context

You have a recipe that serves 4 people with specific ingredient amounts. You need to scale it for different party sizes using broadcasting — exactly how NumPy shines in everyday calculations.

1
2

Step 1: Base Recipe

🎯 Task

Create base_recipe with ingredient amounts for 4 servings (in grams):
[200, 150, 100, 50, 30, 10]
(flour, sugar, butter, eggs_g, salt, vanilla). Print it.

np.array([200, 150, 100, 50, 30, 10])
exercise.py
⌘⏎ run · ⌘← → nav
Output
Run your code to see output here.