|
62 | 62 | :practice: T |
63 | 63 |
|
64 | 64 | Finish the function ``get_vegetarian_menu(menu_items):`` below: |
65 | | - - It takes a list of tuples ``menu_items`` as input, each tuple contains ``(name, category, price, is_vegetarian)``. |
66 | | - - It returns a new nested dictionary that only contains the items from ``menu_items`` where ``is_vegetarian`` is ``True``. |
67 | | - - The outer dictionary keys are ``category`` such as "Soup", "Pizza", "Pasta", "Salad". |
68 | | - - The inner dictionary keys are ``name`` and values are ``price`` for each vegetarian item of that ``category``. |
| 65 | + - It takes a list of tuples ``menu_items`` as input, each tuple contains ``(name, category, price, is_vegetarian)``. |
| 66 | + - It returns a new nested dictionary that only contains the items from ``menu_items`` where ``is_vegetarian`` is ``True``. |
| 67 | + - The outer dictionary keys are ``category`` such as "Soup", "Pizza", "Pasta", "Salad". |
| 68 | + - The inner dictionary keys are ``name`` and values are ``price`` for each vegetarian item of that ``category``. |
69 | 69 | ----- |
70 | 70 | def get_vegetarian_menu(menu_items): |
71 | 71 | ===== |
|
90 | 90 | :practice: T |
91 | 91 |
|
92 | 92 | Finish the function ``get_vegetarian_menu(menu_items):`` below: |
93 | | - - It takes a list of tuples ``menu_items`` as input, each tuple contains ``(name, category, price, is_vegetarian)``. |
94 | | - - It returns a new nested dictionary that only contains the items from ``menu_items`` where ``is_vegetarian`` is ``True``. |
95 | | - - The outer dictionary keys are ``category`` such as "Soup", "Pizza", "Pasta", "Salad". |
96 | | - - The inner dictionary keys are ``name`` and values are ``price`` for each vegetarian item of that ``category``. |
| 93 | + - It takes a list of tuples ``menu_items`` as input, each tuple contains ``(name, category, price, is_vegetarian)``. |
| 94 | + - It returns a new nested dictionary that only contains the items from ``menu_items`` where ``is_vegetarian`` is ``True``. |
| 95 | + - The outer dictionary keys are ``category`` such as "Soup", "Pizza", "Pasta", "Salad". |
| 96 | + - The inner dictionary keys are ``name`` and values are ``price`` for each vegetarian item of that ``category``. |
97 | 97 | ----- |
98 | 98 | def get_order_totals(orders): |
99 | 99 | ===== |
|
0 commit comments