Hero background

Guess the Number Game

Technology • 45 • 30 students • Created with AI following Aligned with Common Core State Standards

Download now

Free PDF · we'll email you a copy

Technology
45
30 students
25 May 2026

Teaching Instructions

This is lesson 5 of 15 in the unit "Micro:bit Explorers". Lesson Title: Creating a Simple Game Lesson Description: Develop a basic game using button controls. Students will create a 'Guess the Number' game using user input.

Overview

Students build a simple “Guess the Number” game using Micro:bit button inputs and a basic feedback loop. They connect game logic to clear variable-based statements and use substitution-style checking to verify whether a guess is correct.

Learning intentions

Students will be able to:

  • Write an expression that records game operations using variables (guess, target, score).
  • Use substitution to test whether a specific guess value makes the game condition true.
  • Use button controls to update variables and drive game outcomes.
  • Explain how their game logic answers the question: which input values make the win condition true.

Success criteria

Students can:

  • Set a target number and store it in a variable.
  • Use button presses to increment/decrement a guess variable.
  • Check conditions (equal/not equal) to display win/try-again feedback.
  • Describe (in words) how their code determines the correct outcome for a given guess.

Curriculum links

  • Expressions and Equations: understand solving an equation/inequality as answering which values make it true; use substitution to test given numbers.
  • Expressions and Equations: write expressions that record operations with numbers and letters (variables).
  • Expressions and Equations: use variables to represent numbers when solving or answering a real-world/math question.

Lesson structure (45 minutes)

  1. 0–5 min · Hook and model. Teacher demonstrates a finished “Guess the Number” sketch on a projected screen and asks, “What button presses change the game state, and what does ‘win’ mean?” Students quickly share answers with a partner.

  2. 5–12 min · Quick direct teach: variables + condition. Teacher guides students to identify the “equation” inside the game: guess = target and the question “Which guess value makes the condition true?” Students complete a 3-sentence “logic journal” prompt: target is __, guess is __, win happens when __.

  3. 12–20 min · Guided logic check (substitution practice). Teacher writes a sample target and two example guesses on the board (e.g., target = 7, guess = 6 and 7). Students do substitution: “Does guess = target hold?” and record outcomes (try again vs win) in their notes, then name what the code should display.

  4. 20–33 min · Build time: create the game skeleton. Teacher circulates while students assemble the Micro:bit blocks:

  • Initialize variables: target, guess, and optional attempts.
  • Choose how to set target (example: fixed number for testing, then random later).
  • Add button controls: one button increments guess, the other decrements guess. Students run, test, and adjust until guess updates correctly on the LED display.
  1. 33–40 min · Add win/feedback logic. Teacher demonstrates how to implement the condition check: if guess = target then show a win pattern and stop; otherwise show a “try again” pattern (and optionally show direction hints like “high/low”). Students integrate condition blocks and ensure the correct feedback triggers when they reach the target.

  2. 40–45 min · Share + exit check. Students do a rapid “two stars and a wish” gallery check (one improvement, one success). Then they complete an exit ticket: “Write the win condition in words. If target is __ and guess is __, does the player win?”

Resources

  • Micro:bit devices and USB cables (or teacher demo unit if needed)
  • Micro:bit programming environment (block-based) ready on each computer/tablet
  • Pre-made starter template for “Guess the Number” (optional but recommended)
  • Variable name cards (target, guess, attempts)
  • Printed game logic journal (quick substitution practice)
  • Timer/visual agenda slide
  • LED feedback icons worksheet (win/try again/high/low)

Assessment

  • Formative during build: teacher checks that students correctly update guess with each button press and that variables are named and used consistently.
  • Formative during feedback logic: teacher questions students, “What value makes the win condition true?” while students test.
  • Exit ticket: win condition in words plus a quick substitution check using one target/guess pair.

Differentiation

  • Support: provide sentence starters such as “The win happens when ___ equals ___” and a checklist for required blocks (variables, buttons, condition, feedback).
  • Support for EAL/SEN: allow verbal responses for the logic journal and exit ticket; include a word bank (target, guess, win, try again, equals).
  • Extension: after the basic version works, challenge students to add “attempts” counting and a win screen that includes the attempt number.
  • Math challenge for advanced students: require students to add a “high/low” hint by checking whether guess < target or guess > target and explain the condition using substitution examples.

Create Your Own AI Lesson Plan

Join thousands of teachers using Kuraplan AI to create personalized lesson plans that align with Aligned with Common Core State Standards in minutes, not hours.

AI-powered lesson creation
Curriculum-aligned content
Ready in minutes

Created with Kuraplan AI

Generated using openai/gpt-5.4-nano

🌟 Trusted by 1000+ Schools

Join educators across United States