0 / 34
Scenario

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])
Related lessons: Lesson 1, Lesson 8, Lesson 14, Lesson 15
exercise.py
โŒ˜โŽ run ยท โŒ˜โ† โ†’ nav
โ–ถ Output
Run your code to see output here.