Refactor to a Pure Function
A rewards system needs to add 10 bonus points to every score in a list, without changing the original list — the caller needs both the original and boosted lists afterwards.
Complete add_bonus(scores) so it returns a new list with 10 added to each score, and never modifies scores itself.
main.py
Loading editor…
Console
Run your code to see output here.
Hints