Practice · 3 of 5
Fix the integer division
CHALLENGE
Difficulty: intermediate+25 XP
longWords compiles and runs but fails {"a", "b", "cdef"}: average is 2.0, only "cdef" is strictly longer, expected 1 — check what the current code returns and why. Repair the one marked line.
Press Submit to check your solution.
Back to lesson: Practice: Specification workshop