Record multiple values at the same time in an array (list), and compare values.
- Read through the student material in the LEGO® Education SPIKE™ App.
2. Engage (5 Min.)
- Use the ideas in the Ignite a Discussion section below to engage your students in a discussion related to this lesson.
- Explain the lesson.
3. Explore (15 Min.)
- Have your students work in pairs to build the brain game model.
- Ask them to play the program to make sure their model is working correctly. They should see that the Game Master is indicating the position of the red brick in a candy stick.
4. Explain (10 Min.)
- Ask your students to program the detection of a second red brick in a second candy stick (player 2), using a second array.
- Make sure your students understand and can explain the concept of an array.
5. Elaborate (15 Min.)
- Explain the memory game challenge and allow some time for your students to create their algorithms.
- Give feedback on each student's performance.
- You can use the assessment rubrics provided to simplify the process.
Ignite a Discussion
Start a discussion about the memory game and the importance of keeping your mind active. Ask relevant questions, like:
- Why is it important to keep your mind active?
- What's an array?
- How will an array be used in our memory game?
- How can games improve older people's memories?
Present the video to your students about what they are about to do
Split each team's building tasks to ensure that everybody is actively involved:
- Student A: Game Master Head
- Student B: Game Master Body
Using the Color Sensor
Check out the help section in the SPIKE App to find out more about how to use the Color Sensor.
Brain Game Rules
The goal of this lesson is to create the code for a memory game.
Here are the rules:
- Player 1 feeds a candy stick to the Game Master, who records the sequence of colors in an array.
- Player 2 feeds another candy stick to Game Master, who records the sequence of colors in a second array.
- The program compares the 2 arrays and lights up an LED on a row to indicate where the colors of 2 bricks match.
- Player 2 can reorder their bricks again to try and match the order of player 1’s bricks.
Simplify this lesson by:
- Explaining the concept of an array(list) by starting with an unplugged activity.
- Play the game using a 3 bricks candy stick (instead of 5) to start with
Take this lesson to the next level by:
- Asking your students to improve the game in various ways (e.g., by using more than 5 colors or by changing the way LED responds to a correct or incorrect color sequence)
- Adding a function where player 2 only has 5 chances to guess the correct sequence
- Having your students explore different theories of ordered lists commonly used in computing
Teacher Observation Checklist
Create a scale that matches your needs, for example:
- Partially accomplished
- Fully accomplished
Use the following success criteria to evaluate your students' progress:
- Students can accurately describe the concept of an array (list).
- Students can create and correctly use an array (list) correctly in their programs.
- Students can use multiple arrays (lists) in their programs, comparing the value of each index.
Have each student choose the brick that they feel best represents their performance.
- Blue: I've used an array (list) in my program.
- Yellow: I've created a second array (list) in my program.
- Violet: I'm an array master! I can perform multiple operations on arrays (list). Give me any array challenge and I'll solve it!
Encourage your students to provide feedback to others by:
- Having one student score the performance of another using the colored brick scale above.
- Asking them to present constructive feedback to each other so that they can improve their group's performance during the next lesson.
Language Arts Extension
To incorporate language arts skills development:
- Ask your students to prepare a presentation to explain the game, making sure they correctly use technical terms, like:
▷ Index of array
Note: This will make for a longer lesson.
To incorporate math skills development:
- Explore various statistics concepts.
▷ Collect bivariate data (e.g., time at which the game was played and the number of trials it took for students to find the right sequence of colors and investigate the relation between the values).
Note: This will make for a longer lesson.
Students who enjoyed this lesson might be interested in exploring these careers pathways:
- Health Science (Allied Health)
- Health Science (Medical & Health Careers)
- Health Science (Medical Assistant)
- Information Technology (Computer Programming)
- Science, Technology, Engineering & Mathematics (Science and Math)
- Explore ways of storing values in an array and use that information for a specific purpose
- Develop their ability to recognize patterns and create effective programs
Refine computational models based on the data they have generated.
Use lists to simplify solutions, generalizing computational problems instead of repeatedly using simple variables.
Determine the meaning of words and phrases as they are used in a text, including figurative, connotative, and technical meanings; analyze the impact of specific word choices on meaning and tone, including analogies or allusions to other texts.
Construct and interpret scatter plots for bivariate measurement data to investigate patterns of association between two quantities. Describe patterns such as clustering, outliers, positive or negative association, linear association, and nonlinear association.
Download, view, or share as an online HTML page or a printable PDF.