Hero background

Random Dice

STEM • 45 • 25 students • Created with AI following Aligned with Common Core State Standards

Download now

Free PDF · we'll email you a copy

STEM
45
25 students
25 May 2026

Teaching Instructions

This is lesson 3 of 20 in the unit "Microbit Mini-Unit for Year 6". Lesson Title: Creating a Digital Dice Lesson Description: Students program the Microbit to act as a digital dice roller using random numbers. Success Criteria: The dice program rolls numbers 1-6. Extension: Add sound effects using the Microbit's features.

Overview

Students build a Microbit program that simulates a physical dice using random numbers and a clear mapping from random outputs to the values 1–6. The lesson connects programming choices to the idea of opposite/zero meaning (what “0” represents) and absolute value/distance from zero when interpreting results.

Learning intentions

Students will be able to:

  • Create a Microbit program that uses randomness to “roll” a dice.
  • Map random values to outputs 1–6 so every roll is a valid die result.
  • Explain what their program shows for 0 (if it appears) and how they prevent/interpret it.
  • Check their program by running multiple trials and describing outcomes.

Success criteria

  • I can write code that produces dice values from 1 to 6 on the Microbit display.
  • I can justify how my random-number range becomes exactly 1–6.
  • I can explain the meaning of 0 in the context of my display (why it should not be shown, or what it would mean if it did).
  • I can test and confirm that rolls are within 1–6.

Curriculum links

  • The Number System: use positive and negative numbers together to describe opposite directions/values and explain the meaning of 0 in each situation.
  • The Number System: recognize opposite signs as locations on opposite sides of 0 and that the opposite of the opposite returns the original number (CCSS.MATH.CONTENT.6.NS.C.6a).
  • The Number System: interpret absolute value of a rational number as distance from 0, and magnitude for real-world situations (CCSS.MATH.CONTENT.6.NS.C.7c).

Lesson structure (45 minutes)

  1. 0–5 min · Hook (Digital dice challenge). Teacher shows a finished Microbit “dice” demo and asks: “Where does the randomness come from, and what numbers must never appear?” Students quickly share ideas with a partner.

  2. 5–12 min · Mini-teach (Random range → dice range). Teacher models a typical mapping: “If my Microbit gives numbers in 0–5, I can add 1 to shift to 1–6,” and explains why that removes 0 from the dice results. Students write a quick note: “My plan to avoid/handle 0.”

  3. 12–20 min · Guided build (First working dice). Teacher provides the starter blocks/project structure (or directs students to their class template) and circulates while students:

  • Choose a random number block (teacher ensures they understand the start/end values).
  • Add the needed adjustment so outputs are exactly 1–6.
  • Configure “roll” behavior (e.g., press button A, tap, or shake).
  1. 20–28 min · Debug lab (Correctness checks). Teacher frames a debugging rule: “Test the edges first—does your program ever show 0 or 7?” Students run at least 10 rolls, record any invalid output on a paper checklist, and fix code immediately.

  2. 28–36 min · Math reasoning connection (0, signs, and distance). Teacher asks a structured question tied to number meanings:

  • “If your program accidentally shows 0, what does 0 mean in your dice context?”
  • “Would negative numbers ever make sense on a dice? Why not?”
  • “If you take the absolute value of a result, what would it mean as ‘distance from 0’?” Students answer using complete sentences, connecting to how 0 represents “no value” on the dice display and why dice must be positive.
  1. 36–43 min · Partner test + performance. Students swap devices (or swap roles) and each partner performs the same test: 20 rolls, verify all are 1–6, and confirm the roll trigger works consistently. Students add one improvement suggestion to their partner’s feedback sheet.

  2. 43–45 min · Exit ticket (Quick evidence). Students submit a short response:

  • “My random range starts at __ and ends at __.”
  • “I mapped it to 1–6 by doing __.”
  • “The value 0 means __ in my program (or why it never appears).”

Resources

  • Microbit devices (1 per student if possible; otherwise pairs)
  • Computers with Microbit programming environment (block-based preferred for beginners)
  • Class starter template/project with dice display stub
  • Student recording sheet for roll tests (10–20 trials)
  • Optional: mini “mapping cards” showing examples (e.g., 0–5 then +1)
  • Timer or visible countdown for testing rounds
  • Display/feedback checklist: “Only 1,2,3,4,5,6 appear”

Assessment

  • Formative: teacher observes students’ random mapping step and checks for correct range edges (0/7 issues).
  • Formative: roll-test checklist during the 20–28 min debugging lab (students show evidence of only 1–6).
  • Exit ticket: confirms students can explain the mapping and the meaning/handling of 0.

Differentiation

  • Support: provide sentence starters for the math reasoning connection (“In my dice context, 0 would mean…” / “Negative numbers would not make sense because…”).
  • Support: give a “range mapping” reference card with two common options (0–5 then +1; 1–6 directly).
  • Extension for early finishers: ask students to add a second behavior (e.g., “button B shows the last roll” or “shake to roll again”) while maintaining 1–6 correctness.
  • EAL/SEN: allow oral explanations or drawings for the 0/sign/distance question; accept approximate wording as long as meaning is clear.

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