Module 2: Memory

Course: Scratch Programming     Level: Module 2     Project 25 of 35

Official Raspberry Pi Project

This lesson is based on the official Raspberry Pi Foundation project. Open it alongside this guide to access the starter project, step-by-step instructions and community remixes.

### [🍓 Open "Memory" on Raspberry Pi Projects →](https://projects.raspberrypi.org/en/projects/memory)

How to use it: Click the link above, then click See Inside on the Scratch project to explore the finished version. Use Remix to get your own copy to edit.


What You Will Build

Build a card memory matching game with a variable match tracker.


What You Will Learn

By the end of this project you will be able to:


You Will Need

Item Details
🌐 Browser Any modern browser — Chrome, Firefox or Edge
🔶 Scratch account Free at scratch.mit.edu
⏱️ Time Approximately 30–45 minutes
📋 Starter project Available via the Raspberry Pi link above

Step-by-Step Guide

  1. Create 8 pairs of cards (16 total) using sprites with two costumes: front and back.
  2. At the start: shuffle positions randomly, show all cards face down.
  3. When a card is clicked: flip it face up (switch costume).
  4. Track the first and second card clicked using variables.
  5. Compare the two cards: if they match, leave them face up and add to score.
  6. If they don’t match: wait 1 second, flip both back face down.
  7. Count attempts. When all pairs found: show You win in X attempts!
  8. Add a timer to create a time-attack mode.
  9. Add difficulty levels: easy (4 pairs), medium (8 pairs), hard (16 pairs).
  10. Shuffle card positions on each new game using a list.

Extension Challenges

Try these after completing the main project:


Reflection Questions

  1. Which Scratch blocks did you use most in this project?
  2. What would you add or change if you had more time?
  3. How could you reuse the ideas from this project in a different context?

Share Your Work

When your project is complete, click Share in Scratch and post the link to your class or the Techbase community.


Back to Scratch Course     Next: Lesson 26