Skip to main content

Practice ยท 2 of 5

Guard the empty case

CHALLENGE
Difficulty: intermediate+25 XP

Complete Register. The subtlety: average() must return 0 when no items โ€” the spec's guard. Everything else is translation.

Back to lesson: Practice: FRQ class design lab