Skip to content

Commit 6202cef

Browse files
authored
1 parent 0a7ec8a commit 6202cef

2 files changed

Lines changed: 14 additions & 12 deletions

File tree

exercises/concept/cater-waiter/.meta/exemplar.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ def clean_ingredients(dish_name, dish_ingredients):
1414
"""Remove duplicates from `dish_ingredients`.
1515
1616
Parameters:
17-
dish_name (str): The name of the dish.
17+
dish_name (str): The name of the dish.
1818
dish_ingredients (list): The ingredients for the dish.
1919
2020
Returns:
21-
tuple: Containing (dish_name, ingredient set).
21+
tuple: Containing (dish name, ingredient set).
2222
2323
This function should return a `tuple` with the name of the dish as the first item,
2424
followed by the de-duped `set` of ingredients as the second item.
@@ -36,7 +36,7 @@ def check_drinks(drink_name, drink_ingredients):
3636
drink_ingredients (list): Ingredients in the drink.
3737
3838
Returns:
39-
str: drink_name appended with "Mocktail" or "Cocktail".
39+
str: `drink_name` appended with "Mocktail" or "Cocktail".
4040
4141
The function should return the name of the drink followed by "Mocktail" (non-alcoholic) and drink
4242
name followed by "Cocktail" (includes alcohol).
@@ -57,7 +57,7 @@ def categorize_dish(dish_name, dish_ingredients):
5757
dish_ingredients (set): The ingredients for the dish.
5858
5959
Returns:
60-
str: TThe dish name appended with ": <CATEGORY>".
60+
str: The dish name appended with ": <CATEGORY>".
6161
6262
This function should return a string with the `dish name: <CATEGORY>` (which meal category the dish belongs to).
6363
`<CATEGORY>` can be any one of (VEGAN, VEGETARIAN, PALEO, KETO, or OMNIVORE).
@@ -134,11 +134,11 @@ def separate_appetizers(dishes, appetizers):
134134

135135

136136
def singleton_ingredients(dishes, intersection):
137-
"""Determine which `dishes` have a singleton ingredient (an ingredient that only appears once across dishes).
137+
"""Find singleton ingredients within the group of dishes (ingredients that only appear once across dishes).
138138
139139
Parameters:
140140
dishes (list): Group of ingredient sets.
141-
intersection (constant): Can be one of `<CATEGORY>_INTERSECTIONS` constants imported from `sets_categories_data.py`.
141+
intersection (set): Can be one of `<CATEGORY>_INTERSECTIONS` constants imported from `sets_categories_data.py`.
142142
143143
Returns:
144144
set: Containing singleton ingredients.

exercises/concept/cater-waiter/sets.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ def clean_ingredients(dish_name, dish_ingredients):
1414
"""Remove duplicates from `dish_ingredients`.
1515
1616
Parameters:
17-
dish_name (str): The name of the dish.
17+
dish_name (str): The name of the dish.
1818
dish_ingredients (list): The ingredients for the dish.
1919
2020
Returns:
21-
tuple: Containing (dish_name, ingredient set).
21+
tuple: Containing (dish name, ingredient set).
2222
2323
This function should return a `tuple` with the name of the dish as the first item,
2424
followed by the de-duped `set` of ingredients as the second item.
25+
2526
"""
2627

2728
pass
@@ -35,10 +36,11 @@ def check_drinks(drink_name, drink_ingredients):
3536
drink_ingredients (list): Ingredients in the drink.
3637
3738
Returns:
38-
str: drink_name appended with "Mocktail" or "Cocktail".
39+
str: `drink_name` appended with "Mocktail" or "Cocktail".
3940
4041
The function should return the name of the drink followed by "Mocktail" (non-alcoholic) and drink
4142
name followed by "Cocktail" (includes alcohol).
43+
4244
"""
4345

4446
pass
@@ -52,7 +54,7 @@ def categorize_dish(dish_name, dish_ingredients):
5254
dish_ingredients (set): The ingredients for the dish.
5355
5456
Returns:
55-
str: TThe dish name appended with ": <CATEGORY>".
57+
str: The dish name appended with ": <CATEGORY>".
5658
5759
This function should return a string with the `dish name: <CATEGORY>` (which meal category the dish belongs to).
5860
`<CATEGORY>` can be any one of (VEGAN, VEGETARIAN, PALEO, KETO, or OMNIVORE).
@@ -112,11 +114,11 @@ def separate_appetizers(dishes, appetizers):
112114

113115

114116
def singleton_ingredients(dishes, intersection):
115-
"""Determine which `dishes` have a singleton ingredient (an ingredient that only appears once across dishes).
117+
"""Find singleton ingredients within the group of dishes (ingredients that only appear once across dishes).
116118
117119
Parameters:
118120
dishes (list): Group of ingredient sets.
119-
intersection (constant): Can be one of `<CATEGORY>_INTERSECTIONS` constants imported from `sets_categories_data.py`.
121+
intersection (set): Can be one of `<CATEGORY>_INTERSECTIONS` constants imported from `sets_categories_data.py`.
120122
121123
Returns:
122124
set: Containing singleton ingredients.

0 commit comments

Comments
 (0)