Rocket is hungry. "I want one function that makes any lunch!" he says. "Sandwich, salad, or soup."
Raven thinks about it. "What do you notice? Each lunch needs different steps."
Nova hums softly. "Here is a hint. Give the function an input called kind. Then use IF and ELSE to pick the steps." Let's help them design the lunch function.
Design a MAKE_LUNCH function. It takes one input: 'kind' (sandwich, salad, soup).
Write at least one IF/ELSE branch inside the function.
| Statement | True or false? |
|---|---|
| One function can do different things for different inputs. | ? |
| An input is written inside the parentheses. | ? |
| A function with an IF runs both paths every time. | ? |
| make_lunch(salad) heats a pot. | ? |