karaoke scoring: edge case
karaoke scoring: edge case: a task in smol-software-harbor (Harbor dataset). Scoring an empty song (no target notes, e.g. an instrumental track) crashes with ZeroDivisionError in karaoke/scoring.py . As the docstring of accuracy() says, an empty performance must score 0.0 , and score song() must…
The task
Scoring an empty song (no target notes, e.g. an instrumental track) crashes with `ZeroDivisionError` in `karaoke/scoring.py`. As the docstring of `accuracy()` says, an empty performance must score `0.0`, and `score_song()` must then print `0.0%` with no stars. Fix it and run `python3 -m pytest -q`.
Part of efederici/smol-software-harbor.