top of page

Working with Data

Lesson Overview

This game is to help primary students to fundamental programming concepts using Scratch. Focusing on conditional ("if XX then XX") and repetition ("repeat XX") blocks, these activities aim to enhance students' understanding of logical operations and loops through engaging, real-world applications.

Learning Objectives

  • Develop the ability to categorize and (re)organize given data.

  • Enhance problem-solving skills and computational thinking through the practical application of variables, loops, and conditional statements in Scratch programming.

Task Description and Resources

Task 1: Height Grouping Tool for Physical Education Class

Problem Statement: Please design a program that can automatically divide students into two groups based on their height and records their names for a PE class.


  • To create an automated tool in Scratch that helps categorize and organize students’ profiles.

  • Understand and apply repetition (“Repeat“) and conditional statements (“if XX then XX”).

Suggested Steps:

  1. Initiate the project by setting up variables for students' names, heights, and group assignments.

  2. Use the "ask and wait" block to collect each student's name and height.

  3. Apply "if XX then XX" blocks to categorize students based on their height, adding their names to the appropriate list.

  4. Display the two groups with the names of the students in each category.

Reference Code:


Task 2: Seasonal Flowers for Different Birthdays

Problem Statement: As part of a new semester activity, please develop a Scratch program to help categorize students’ names by their birth season and assign them corresponding flower seeds.

Objectives: Utilize loops ("Repeat") and conditional logic ("if XX then XX") effectively.

Suggested Steps:

  1. Create variables for student names, birth months, and assigned flower seeds.

  2. Use "ask and wait" blocks to gather information about each student's birth month.

  3. Implement conditional logic to assign flower seeds based on the student's birth season.

  4. Compile and display a list showing each student's name alongside their assigned flower seed.

Reference Code:



These tasks are designed not only to engage students in programming for data manipulation but also to deepen their mathematical understanding through practical applications. By integrating educational content with interactive programming challenges, these activities foster a fun and productive learning environment, encouraging students to apply mathematical concepts and computational thinking skills creatively in their real life.


The author would like to thank Hui Yan YE for designing this lesson and appreciate all the anonymous teachers and students who participated in this research.

bottom of page