In the form of a treasure hunt, this mystery has students follow a sequence of instructions, use and manipulate a variable, and make selections (logical decisions) based on the value of the variable.
This is a two stage mystery - students first read all of the slips, then move to the next stage in which they follow a slip-by-slip basis to find the treasure.
Each group chooses which character they want to help at the beginning of the mystery - this changes the value (the number) of marbles they start off with, and therefore, the sequence to follow and the final destination (where the treasure is). This engages students more as they can decide on the character they like the most, but also helps reflect the concept of initialisation values and how they affect the execution of any program/algorithm.
The mystery is designed to help students verify if they're following the instructions correctly or not. If they realise that they're not at the right location or that they have an incorrect number of marbles at any point, they can restart the process to identify where things went wrong.
When students believe they have reached their treasure, they can then write their answer - complete with the secret code for the lock. There are different ways you can ask them to explain how they got to the treasure. The standard would be for the students to lay out their route with slips on the screen as well as type each step of the way into their answer or even drawing it on a piece of paper.
Depending on your preferred teaching approach, the link between the programming concepts and the mystery can either be explained after the mystery to aim for the ‘aha’ moment, or before the mystery so that students are aware of their use during the hunt.
This Innovate My School article explores the process of creating this mystery and what it aims to do.
- that what is meant by a sequence is nothing more than correctly following a set of instructions (as they did in this treasure hunt)
- the use of variables (through the marbles bag) and that they are places to store values that can be changed during the course of a computer program
- how selections are normally based on values in variables thus changing the values in such variables changes the rest of the sequence which is to be executed
- how changing the initial value of a program (the character to start with and consequently, the initial value of the variable) changes the final outcome