Back

Challenge Set 4

Unlocks after Activity 1.12. Five code challenges, all driven by a brief.

divider

What This Set Is For

Every challenge here has exactly two outcomes. One if, one else, and nothing else — these are deliberately sized to the decision Activity 1.12 taught, not the chain that arrives in 1.13.

If you find yourself wanting a third branch, re-read the brief. It is not there.


Both of These Turn on a Boundary

A bag of exactly fifty pounds. A return on exactly day thirty. A temperature of exactly 100.4. In each brief the person asking has told you, in their own words, that the edge case is the thing that causes arguments.

That makes the requirements list the graded artifact, not the program. A program that picks one answer at the boundary and says why is finished. A program that happens to produce an answer because of which comparison you typed first is not, even when the answer is the same.

Activity 1.12's optional challenge was about exactly this, with > against >= on a cargo limit. Same decision, real brief.


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

Bag Fee asks for a calculation inside the decision, not just a message. Return Window has no calculation at all — it is two stars because the thinking is in the requirements list. Fever Check has no calculation either, and no diagnostic message beyond the boundary itself — start here if two stars feels like a stretch. Oxygen Alarm is built the same plain way as Fever Check, a different console to watch. Curfew Check is a second two-star option built the same way as Return Window — a boundary the brief admits nobody agrees on, not a calculation.

These are options, not a checklist. Pick whichever combination gets you to what the dropbox asks for — Fever Check and Oxygen Alarm are the easiest way in if the others feel like too much at once.


Which Homework These Feed

These feed the build drop after Activity 1.13, which draws on the code challenges unlocked so far in Part 2 — these three, plus the ones under Activity 1.13.

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

Commence Challenges