Question About Using `exercism/note` Block for Allergy Exercise

Hi Exercism team,

I noticed that in exercises like the “Allergies” problem, there are notes included in the exercise description, but they are not using the exercism/note block. Would it be a good idea to update such exercises to use the exercism/note block, as described here?

This could help make the notes more visually distinct and improve the readability of the exercises.

Let me know your thoughts!

While the line does start with “Note”, I’m not sure that note block is actually any different from any other part of the instruction. It is one more piece of instruction to follow.

Should that block be treated differently than any other part of the instructions? Why?

Could you link to a couple of examples as well please :slight_smile:

While the line does start with “Note”, I’m not sure that note block is actually any different from any other part of the instruction. It is one more piece of instruction to follow.

Indeed, this isn’t the standard “note” added via instruction.append.md in each track. Instead, it’s part of the instructions directly defined in the problem-specifications repository.

Should that block be treated differently than any other part of the instructions? Why?

I wasn’t entirely sure about how this should be handled, which is why I wanted to bring it up here on the forum. If we get the “go-ahead,” we can consider making changes!

Sure, and apologies for not including these details earlier—I forgot!

Current Instruction for Allergies (Allergies in Java on Exercism)

Description

Given a person’s allergy score, determine whether or not they’re allergic to a given item, and their full list of allergies.

An allergy test produces a single numeric score, which contains information about all the allergies the person has (that they were tested for).

The list of items (and their values) that were tested are:

  • eggs (1)
  • peanuts (2)
  • shellfish (4)
  • strawberries (8)
  • tomatoes (16)
  • chocolate (32)
  • pollen (64)
  • cats (128)

For example, if Tom is allergic to peanuts and chocolate, he gets a score of 34.

Now, given that score of 34, your program should be able to determine:

  • Whether Tom is allergic to any one of the allergens listed above.
  • All the allergens Tom is allergic to.

Note: A given score may include allergens not listed above (e.g., allergens that score 256, 512, 1024, etc.).
Your program should ignore those components of the score.
For example, if the allergy score is 257, your program should only report the eggs (1) allergy.


Example of the exercism/note Block in the “Yacht” Exercise (Yacht in Java on Exercism)

Instructions

Given five dice and a category, calculate the score of the dice for that category.

You'll always be presented with five dice.
Each dice's value will be between one and six inclusively.
The dice may be unordered.

Scores in Yacht

Category Score Description Example
Ones 1 × number of ones Any combination 1 1 1 4 5 scores 3
Twos 2 × number of twos Any combination 2 2 3 4 5 scores 4
Threes 3 × number of threes Any combination 3 3 3 3 3 scores 15
Fours 4 × number of fours Any combination 1 2 3 3 5 scores 0
Fives 5 × number of fives Any combination 5 1 5 2 5 scores 15
Sixes 6 × number of sixes Any combination 2 3 4 5 6 scores 6
Full House Total of the dice Three of one number and two of another 3 3 3 5 5 scores 19
Four of a Kind Total of the four dice At least four dice showing the same face 4 4 4 4 6 scores 16
Little Straight 30 points 1-2-3-4-5 1 2 3 4 5 scores 30
Big Straight 30 points 2-3-4-5-6 2 3 4 5 6 scores 30
Choice Sum of the dice Any combination 2 3 3 4 6 scores 18
Yacht 50 points All five dice showing the same face 4 4 4 4 4 scores 50

If the dice do not satisfy the requirements of a category, the score is zero.
For example:

  • If Four of a Kind is entered in the Yacht category, zero points are scored.
  • A Yacht scores zero if entered in the Full House category.

The exercism/note block may not render correctly here, so I’m also including a screenshot of its implementation in this exercise.


Let me know if this addresses the context properly, or if more details are needed!