Hands-On Science Lab

Sections › Coding › If-Then Card Sorting Game

If-Then Card Sorting Game

Sort picture cards with simple rules like 'if it's red, put it in the box'. The first step to how computers make decisions.

CodingAges 4–720 minutesFamily plan
Age4–7
Time20 minutes
DifficultyEasy
SectionCoding

How it started

We started with 'if it's an animal, put it on the rug'. My son sorted fourteen cards perfectly, then held up a picture of a teddy bear and gave me a long, serious look. 'Is a teddy an animal?' We had a twenty-minute debate. That's exactly the kind of problem programmers argue about.

What you need

20–30picture cards (cut from magazines or drawn on card): animals, food, vehicles, toys
2–3boxes, bowls or hoops for sorting
1set of rule cards you write: 'IF red → box 1'
1pencil and markers

What your child will learn

  • Following rules
  • Classifying
  • Logical thinking
  • Pattern spotting

Key words: rule, if-then, else, sort, flowchart

🔒 The full lesson is part of the Family plan

Unlocks the 8 illustrated steps, safety notes, the science for kids and parents, problems and fixes, variations, the printable record sheet, the 5-question quiz and the parent guide.

A free account gets this month's two free activities in full:

See Family plans Sign in