Several values, one branch

Complete the previous lesson to unlock this one.

Back to the path

Several values, one branch

Level 2: Types. A label can list values separated by commas. Weekday and weekend are that pattern, not five copied lines.

Read an integer day number. Output:

  • 1, 2, 3, 4 or 5 → weekday
  • 6 or 7 → weekend
  • anything else → invalid