Ambiguity in categorize_dish() Category Logic (Python Sets Challenge)

Hi everyone :wave:

While working on the “Cater Waiter” (Sets) challenge, I noticed that the instructions for the categorize_dish() function can be a bit unclear.

The problem states that each dish “will fit into one of the categories” (VEGAN, VEGETARIAN, PALEO, KETO, or OMNIVORE), but it doesn’t specify how to decide that classification.

Because of this, students might interpret the task in different ways — for example:

  • assigning a dish to the first category that contains the first item of its ingredients.
    or
  • counting ingredient occurrences across categories and choosing the most common one.

However, the intended logic seems to be that all ingredients of a dish must belong to the same category. This distinction is important, especially since the challenge is designed to make students use set comparison methods such as issubset() to test whether a dish’s ingredients fit entirely within a dietary group.

:bulb: Proposed Improvement

To make this clearer, the instructions could include a short clarification such as:

“A dish belongs to a category only if all its ingredients are included in that category’s ingredient set.”

This small addition would prevent confusion and guide students toward the intended use of set relationships.