AQA 7517 4.2.7.1: Dictionaries
The free BugBot lesson that teach this point, a robot to try it on, and the past-paper questions that test it.
What it covers
You have already used Python dictionaries as look-up tables, such as OPPOSITE["left"] giving "right" in lesson A3.2. At A level a dictionary is an abstract data type with its own operations, usually built on the hash table from the last lesson, and it is one of the most useful structures a programmer has. In this lesson BugBot reads a message of commands and looks each one up by name.
- The dictionary ADT
- How it works: a hash table underneath
- Information retrieval
- A sparse map
- Look-up tables
Or do it in the simulator, with tasks that mark themselves
Lessons that teach it
- A3.6 Dictionaries Data structures
Keys and values, dictionaries built on hash tables, and information retrieval: commands looked up by name.
Try it on a robot
The task from A3.6 Dictionaries, running here. Change the program and press Run.
The specification is AQA's own document; this page says which of our lessons teach point 4.2.7.1 and is not endorsed by the board.