Back

Challenge Set 5

Unlocks after Activity 1.13. Three code challenges driven by a brief, plus the Part 2 review set.

divider

What This Set Is For

All three of these need a chain. Three sizes, five letter grades, three light colors — more than two outcomes, exactly one of which is right for any given input.

That is the shape Activity 1.13 taught, and the ordering rule comes with it: most specific first, loosest last. Get it backwards and branches quietly stop being reachable, with no warning from anything. Traffic Light's three colors never overlap, so order will not break it the way it can break Letter Grade — but the chain shape, and the habit of writing one, is still the point.


Test Every Band, Not Just One

Activity 1.13's rainfall chain had a built-in check: four values that must give four different answers, because two agreeing means a branch is dead. Do the same thing here.

Pick one input for every band your program has, run all of them, and confirm you got every answer exactly once. A chain that has only been tested on one value has not been tested.


Both Are Briefs

Nobody lists the steps on either page. You get a result somebody wants, and you write the requirements list first — input, calculate, output, and every decision you had to make yourself.

If that is unfamiliar, read it once here: How to Read a Brief, in Challenge Set 1.


The Challenges

Hat Size Checker lets you choose your own ranges, which means you also own the boundaries. Letter Grade gives you the bands and hides the real question in a complaint about 89.5 — read the brief twice. Traffic Light gives you the bands too, but they never overlap, so there is no boundary trap waiting in it — start here if a chain by itself is still new.

These are options, not a checklist. Pick whichever combination gets you to what the dropbox asks for — Traffic Light is the easiest way in if Hat Size Checker already felt shaky.


The Review Set

Three pages, one drop, and none of them need a computer. All three are reading somebody else's code — do them on paper in one sitting, which is how the exam will ask for them.

Question Set 2 is timed at 10 minutes. Start the timer before you read the first question, not after.


Which Homework These Feed

Two separate drops land after this activity. The code challenges here feed the build drop, together with the three under Activity 1.12 — six are available and the drop asks for fewer. The three review pages above are the other drop, and that one wants all three.

The dropbox says how many. This page only says what is available.

Commence Challenges