Open
Description
The exercise of updating a player's score has an undefined behavior that is a teachable opportunity. The undefined behavior is what should happen when an attempt is made to update the score of a player who has not been added. There are two possibilities:
- No change should occur (in which case the exercise should test for that and the student should guard against attempting to change a non-exesitant key in the dictionary)
- The new player should be added (in which case the student should use the dictionary's key base subscript with a default value (sorry I couldn't find a better reference)
I can submit a PR for either behavior, but don't know which to prefer teaching.
Metadata
Metadata
Assignees
Labels
No labels