Lesson 2: Yes/No Questions
Estimated time: 15-20 minutes | Screen-Free Activity
What You Will Learn
By the end of this lesson, your child will be able to:
- Explain why yes/no questions are the building blocks of decisions
- Use yes/no questions to figure out an answer (like in 20 Questions)
- Sort objects into groups using yes/no questions
The Power of Yes and No
In the last lesson, you learned about if/then rules. The "if" part is always a question that has a yes or no answer. Is it raining? Yes or no. Are you hungry? Yes or no. Is the light red? Yes or no.
It turns out that yes/no questions are incredibly powerful. With enough yes/no questions, you can figure out almost anything!
Binary means there are only two choices: yes or no, true or false, on or off, 1 or 0. Computers think in binary -- every decision a computer makes comes down to a yes/no question.
This might sound too simple to be useful, but let us play a game to see just how powerful yes/no questions really are.
Game: 20 Questions
Screen-Free Activity: Play 20 Questions (10 minutes)
How to play:
- One player thinks of something (an animal, object, food, etc.) and keeps it secret.
- The other player gets to ask up to 20 yes/no questions to figure out what it is.
- Each question can only be answered with "yes" or "no" (not "maybe" or "sometimes").
- After 20 questions (or sooner!), the guesser tries to name the thing.
- Take turns being the thinker and the guesser.
Good first questions to try:
- "Is it alive?" (This splits everything into living and non-living!)
- "Is it bigger than a cat?"
- "Can you eat it?"
- "Would you find it inside a house?"
- "Is it something you can hold in one hand?"
Strategy tip: The best questions are ones that cut the possibilities in half. "Is it a dog?" is not as helpful as "Is it an animal?" because the first question only checks one thing, but the second question rules out a whole group.
Talk About It
After playing, ask your child: "Which questions were the most helpful? Why?" Help them see that broad questions (like "Is it alive?") are more useful early on because they narrow down the options faster. This is exactly how computers search through information -- by asking broad yes/no questions first, then getting more specific.
Sorting with Yes/No Questions
Yes/no questions are also great for sorting things into groups. Imagine you have a pile of animals and you want to organize them. You could ask questions like:
Sorting Animals with Yes/No Questions
Start with these animals: dog, goldfish, eagle, cat, shark, robin, hamster, whale
Question 1: "Does it live in water?"
| YES (lives in water) | NO (does not live in water) |
|---|---|
| goldfish, shark, whale | dog, eagle, cat, robin, hamster |
Question 2 (for the NO group): "Can it fly?"
| YES (can fly) | NO (cannot fly) |
|---|---|
| eagle, robin | dog, cat, hamster |
With just two yes/no questions, we sorted 8 animals into 3 groups! That is the power of binary thinking.
Activity: Sort It Out
Screen-Free Activity (5-10 minutes)
What you need: Small objects from around the house (toys, kitchen items, school supplies -- about 10-15 items) or just use a list of items.
What to do:
- Put the items in a pile (or write their names on pieces of paper).
- Come up with a yes/no question to split the pile into two groups. For example: "Is it bigger than your hand?"
- Sort the items into a YES pile and a NO pile.
- Pick one of the piles and come up with another yes/no question to split it further.
- Keep going until each group has only 1-2 items.
Great sorting questions:
- "Is it bigger than a cat?"
- "Is it made of wood?"
- "Can you eat it?"
- "Is it round?"
- "Would you use it in school?"
- "Is it soft?"
How Computers Use Yes/No Questions
Everything a computer does comes down to yes/no questions. Computers think in ones and zeros (called binary code), and each one or zero is the answer to a tiny yes/no question: Is the electricity on (1) or off (0)?
Here is how your favorite technology uses yes/no questions:
Search Engines
"Does this webpage contain the word the user searched for? Yes or no?" It checks millions of pages with yes/no questions very fast.
Video Games
"Is the player pressing the jump button? Yes or no?" "Did the character touch the ground? Yes or no?" Hundreds of checks every second.
Spam Filters
"Does this email come from someone you know? Yes or no?" "Does it have suspicious words? Yes or no?" Multiple questions decide: inbox or spam?
In the next lesson, you will learn to draw decision trees that show chains of yes/no questions -- just like the sorting activity you just did, but drawn as a picture!
The "Guess the Number" Game
Bonus Game: Guess a Number 1-20
This game shows how powerful yes/no questions are for narrowing things down.
- One player thinks of a number between 1 and 20.
- The other player asks yes/no questions to figure it out.
- The rule: you can only ask questions with a yes or no answer.
The smart strategy: Ask "Is it bigger than 10?" first. That immediately eliminates half the numbers! Then ask "Is it bigger than 15?" (or 5) to cut it in half again. You can find any number from 1 to 20 in just 5 questions or less using this strategy.
This is called binary search, and it is one of the most important ideas in all of computer science. Your child is learning it right now just by playing a guessing game!
Check Your Understanding
1. What does "binary" mean?
2. In 20 Questions, why is "Is it an animal?" a better first question than "Is it a hamster?"
3. How can you sort a group of objects using yes/no questions?
Key Takeaways
- Yes/no questions are the building blocks of all decisions
- Binary means two choices: yes/no, true/false, on/off
- With enough yes/no questions, you can figure out almost anything
- The best questions narrow down the possibilities by splitting them in half
- Computers use yes/no questions for everything -- from search engines to video games
- You can sort objects into groups by asking a chain of yes/no questions
Ready for More?
Next Lesson
In Lesson 3, you will learn to draw decision trees -- diagrams that show chains of yes/no questions as branching paths!
Start Lesson 3