๐ WAYPOINT LESSON
Parts are independent
โญโญโญ advancedโณ 10 min read๐ Lesson 206 of 256
Part (b) never needs part (a); graders score each separately โ a botched part must not cascade.
The weather-station archetype (this module's workshop problem): one array of readings, three behaviors. It exercises every FRQ-Q1 muscle:
- Count with a condition (below freezing): one accumulator, one
comparison. The trap is
<vs<=against 0.0 โ the spec's word "below" means strict. - Longest streak (warm run): the run-counter pattern with a reset. Two state variables (current run, best run) and the reset branch are the whole problem.
- Parallel-array average: walk indexes (not for-each) because two arrays advance together; guard the nothing-matched case so it returns 0.0 instead of NaN.
Notice each part reuses a pattern from modules 4โ7. The FRQ is not new material โ it is your existing patterns under one story, with the story trying to confuse you about which pattern applies.
โก Now practice
Ready to CodeFRQ workshop: the weather stationThree parts of one FRQ, graded independently โ plan first, then implement.
3 challenges ยท ยท ~55 min