High Score Board


Story

This exercise uses the setting of maintaining a high-score board for an arcade hall to teach the concept of key-value collections (maps, hashes, associative arrays, [dictionaries][dict], etc.). A player's name serves as the key, and the score serves as the value.

Tasks

The student is then guided through some operations:

  • Creating a new empty collection.
  • Adding a player to the collection.
  • Putting values associated with existing players in the collection.
  • Updating the values in the collection.
  • Returning an ordered-by-key list from the collection.
  • Returning an ordered-by-value list from the collection.

Implementations

Reference