Learn Without Walls
← Previous Lesson Lesson 3 of 4 Next Lesson →

Lesson 3: Decision Trees

Estimated time: 15-20 minutes | Screen-Free Activity

What You Will Learn

By the end of this lesson, your child will be able to:

What is a Decision Tree?

In the last lesson, you sorted objects by asking yes/no questions. A decision tree is a picture that shows those questions as a branching path. Each question is a fork in the road: one path goes to "yes" and the other goes to "no."

Decision Tree -- A diagram that looks like an upside-down tree. It starts with one question at the top and branches out. Each branch leads to another question or to a final answer. You follow the branches by answering yes or no at each step.

Decision trees are like flowcharts with choices. In Module 3, your flowcharts went straight from start to finish. Now, decision trees have branches where the path splits based on a question. This is where it gets really interesting!

Example: Should I Go Outside?

Let us trace through a simple decision tree together. Start at the top and answer each question.

Is it raining?
YES ↓                 ↓ NO
Do you have a raincoat?
  
Is it very hot?
YES ↓   ↓ NO        YES ↓   ↓ NO
Go outside with raincoat!
Stay inside
Go outside with sunscreen!
Go outside and play!

Trace It Together

Look at the tree with your child. Ask: "What if it IS raining and you DO have a raincoat? Where do you end up?" (Answer: "Go outside with raincoat!") Then try: "What if it is NOT raining and it is NOT very hot?" (Answer: "Go outside and play!") Trace each path with your finger.

Example: What Animal Am I?

Decision trees are great for guessing games too. Here is a simple tree that identifies animals:

Does it have legs?
YES ↓                ↓ NO
Can it fly?
    
Does it live in water?
YES ↓   ↓ NO        YES ↓   ↓ NO
Bird
Dog or Cat
Fish
Snake

This tree uses just two questions to sort animals into four groups. If the animal has legs and can fly, it is probably a bird. If it has legs but cannot fly, it might be a dog or cat. If it has no legs and lives in water, it is a fish. If it has no legs and does not live in water, it is a snake.

Try It: Trace the Path

Think of a goldfish. Start at the top of the tree.

  • Does it have legs? NO -- go right.
  • Does it live in water? YES -- go left.
  • Result: Fish! Correct!

Now try an eagle, then a snake. Does the tree get the right answer each time?

Choose Your Own Adventure

Have you ever read a "Choose Your Own Adventure" book? Those books are decision trees! At the end of each page, you make a choice, and that choice sends you to a different part of the story.

A Mini Adventure

You are exploring a cave. You come to a fork in the path.

Do you go left or right?

  • LEFT: You find a room full of glowing crystals! Do you pick one up?
    • YES: The crystal lights your way deeper into the cave. You find a treasure chest!
    • NO: You admire the crystals and head back to the entrance. A beautiful sunset greets you.
  • RIGHT: You hear a sound. Do you keep going?
    • YES: You discover a friendly bat family! They show you a secret exit.
    • NO: You decide to go back. Better safe than sorry! You enjoy a quiet walk home.

This little story has 4 possible endings, all decided by yes/no choices. That is a decision tree!

Activity: Draw a "What Should I Wear?" Decision Tree

Screen-Free Activity (10 minutes)

What you need: A big piece of paper and colored pencils or markers.

What to do:

  1. At the top of your paper, write the question: "Is it cold outside?"
  2. Draw two lines going down from it. Label one "YES" and one "NO."
  3. Under YES, write another question: "Is it raining?"
  4. Under NO, write another question: "Is it sunny?"
  5. Draw two more branches from each of those questions.
  6. At the bottom of each branch, draw or write what to wear!
    • Cold + Raining = Warm coat and rain boots
    • Cold + Not Raining = Warm coat and regular shoes
    • Not Cold + Sunny = T-shirt and sunglasses
    • Not Cold + Not Sunny = Light jacket

Make it your own: Add more questions! What about wind? What about snow? The more questions, the bigger the tree. Draw pictures of the outfits at the bottom of each branch.

Activity: Create Your Own Adventure

Bonus Activity: Write a Mini Adventure

What you need: Paper and pencil.

What to do:

  1. Start with a situation: "You are a space explorer and you land on a new planet."
  2. Give the reader a choice: "Do you explore the forest or the ocean?"
  3. For each choice, write what happens next and give another choice.
  4. Keep branching until you have at least 4 different endings.
  5. Read it aloud and let your parent (or a sibling) choose the path!

Your child can write about anything: a princess rescuing a dragon, a detective solving a mystery, a chef in a magical kitchen. The topic does not matter -- the decision tree structure is the learning.

Parent Tip

This is a wonderful activity that blends creative writing with logical thinking. If your child loves stories, they will love building decision trees this way. Do not worry about spelling or neatness. Focus on the branching structure: every choice leads to different paths.

Check Your Understanding

1. What is a decision tree?

Answer: A decision tree is a diagram that starts with a question at the top and branches out based on yes/no answers. Each branch leads to another question or to a final result. You follow the branches by answering questions.

2. How is a decision tree different from a flowchart?

Answer: A flowchart usually goes in one direction from start to finish (a single path). A decision tree has branches where the path splits based on a yes/no question. Different answers lead to different paths.

3. In the "Should I Go Outside?" tree, what happens if it is not raining and it is very hot?

Answer: You follow the "NO" branch from "Is it raining?" and then the "YES" branch from "Is it very hot?" The result is: "Go outside with sunscreen!"

Key Takeaways

Ready for More?

Next Lesson

In Lesson 4, you will use if/then blocks in Scratch to make sprites respond to key presses and make interactive stories!

Start Lesson 4

Module Progress

You have completed Lesson 3! One more lesson to go.