Skip to main content

Log Pipeline

Challenge on lesson: Checkpoint: Streaming Pipeline

CHALLENGE
Difficulty: intermediate+25 XP

Implement error_rate(lines) โ€” lines are strings like 'ERROR: disk full' or 'INFO: ok'. Yield-free helper allowed. Return the fraction (round to 2 decimals) of lines that start with 'ERROR: ', ignoring blank/whitespace-only lines. Use a generator pipeline internally (no full-list copies of filtered results). Empty/blank-only input returns 0.0.

Back to lesson: Checkpoint: Streaming Pipeline