Have you ever played the game Guess Who? Then you’ve used Boolean logic! Learn about boolean and comparison operators with this Guess the Elf boolean coding activity!
Boolean logic sounds like a pretty complex concept, but it’s actually very easy to understand. Booleans are a type of data that has two values either true or false that can be used to evaluate logical questions.
Booleans are named after Philosopher and Mathematician George Boole, who first defined an algebraic system in the mid 19th century.

This post contains affiliate links. As an Amazon Associate, Our Family Code earns from qualifying purchases. Please see our Disclosure Policy for more details.
How are Booleans used in Coding?
Booleans are used to produce more effective search results by using Boolean functions to eliminate or provide search parameters for logical questions.
You start off with the idea that a statement is either true or false. It can’t be anything else. After your statement, you can form other statements that are true or false by combining the statements with a Boolean function such as AND and OR.
About Guess Who? Santa’s Elves Boolean Coding Activity
This activity focuses on the comparison operators and boolean operators in selection statements.
== and != are comparison operators
AND and OR are boolean operators
== means “is equal to?” and != means “is not equal to?”
An Elf must meet both conditions in an AND statement and one condition of an OR statement.
Each comparison is a boolean and results in either a True or False answer. Use the selection and boolean statements to Guess the Elf.
How to Play Guess the Elf Boolean Coding Activity
Print out the Guess the Elf Workbook and cut out the elves. Start with all of the elves facing up and flip them over as you work through the code.
Guess Who? Santa’s Elves for Grades K-3
In the printable workbook, the left column shows the questions asked in typical Guess Who format and are great for grades K-3.
Use the questions and answers to present kids with statements regarding the elf. For example, if the question says “Does your elf have brown hair? TRUE” express it in a statement like “The elf we are looking for has brown hair.”
Guess Who? Santa’s Elves for Grades 3-8
In the printable workbook, the right column presents selection and boolean operators and is ideal for grades 3-8. Make sure to go over the boolean and comparison operators before starting the activity.
Make copies of the handout and allow kids to work through the groups of code. Take a poll of which elf might be the answer and then go through the problem together.

Guess the Elf #1
if hairColor == “Brown” OR hasHat == True: flipCardOver()
if hairColor != “Orange”: flipCardOver()
if hasRosyCheeks == True : flipCardOver()
What does this question look like in a two-player Guess Who game?
Does your elf have brown hair? FALSE
Is your elf wearing a hat? FALSE
Does your elf have orange hair? TRUE
Does your elf have rosy cheeks? FALSE
Guess the Elf #2
if gender != “Male” AND hasHat == True: flipCardOver()
if hairColor == “Black” OR hasRosyCheeks != True: flipCardOver()
if hasHat == True: flipCardOver()
if gender != “Female”: flipCardOver()
What does this question look like in a two-player Guess Who game?
Is your elf a male elf wearing a hat? FALSE
Does your elf have black hair? FALSE
Does your elf have rosy cheeks? TRUE
Is your elf wearing a hat? FALSE
Is your elf a male elf? FALSE
Guess the Elf #3
if hasHat != True: flipCardOver()
if gender == “Female” OR hairColor == “Orange”: flipCardOver()
if hatColor != “Red” OR hasRosyCheeks == True: flipCardOver()
What does this question look like in a two-player Guess Who game?
Does your elf have a hat? TRUE
Is your elf a female elf? FALSE
Does your elf have orange hair? FALSE
Is your elf’s hat red? TRUE
Does your elf have rosy cheeks? FALSE
Guess the Elf #4
if hasHat != True OR hatColor == “Green”: flipCardOver()
if hasRosyCheeks != True: flipCardOver()
if hairColor == “Orange” AND hairStyle != “Pigtails”: flipCardOver()
if hairColor == “Brown” OR hairColor == “Black”: flipCardOver()
What does this question look like in a two-player Guess Who game?
Does your elf have a hat? TRUE
Is your elf’s hat green? FALSE
Does your elf have rosy cheeks? TRUE
Does your elf have orange hair and no pigtails? FALSE
Does your elf have brown hair or black hair? FALSE
Check out more Christmas STEAM and coding activities!
- Pascal’s Triangle Christmas Tree Patterns Math Activity
- Frosty Sequences Unplugged Coding Worksheet for Kids
- Communicate Like a Programmer with Christmas LEGO Designs
PIN THIS IMAGE TO SAVE THIS CHRISTMAS CODING ACTIVITY

Christmas Coding Activities
Find more Christmas coding activities to work on computational thinking and beginning coding skills!
Christmas Sudoku Logical Reasoning Activity for Kids
Sudoku is a great activity to strengthen logical reasoning skills and decomposition skills while working with a simple algorithm, a series of instructions for solving problems.
Christmas Pixel Puzzles: Free Color by Number Activity for Kids
These Christmas Pixel Puzzles are a great way to introduce image representation on computers as well as work on number and color recognition.
Computers break pictures down into tiny blocks of color known as pixels. Pixels are organized in a grid and each block contains a single color.
Christmas Algorithm Art Directed Drawing Unplugged Coding Activity
This Christmas tree algorithm art activity is a great unplugged coding activity for kids K-8 to learn how actions can be turned into algorithms.
After completing the activity, kids can work together to communicate their written program to their peers or siblings to test out and debug their Christmas tree code.
Dress the Elf With this Christmas Boolean Logic Activity
Trixie the Elf needs helping searching for the perfect outfit for each day of the week. Learn how to use boolean expressions to narrow down exactly the right outfit in this Christmas Elf boolean logic activity.
Test Your Logical Thinking with this Christmas Logic Word Puzzle
Logic puzzles are a great activity to strengthen logical reasoning skills, boolean, and comparison skills while working with a series of selection statements.
This Christmas logic word puzzle activity is a way for kids to use logical thinking and pattern matching paired with spatial recognition and spelling.
Winter Unplugged Coding Worksheet: Frosty Sequences
Find the correct sequence to help Frosty the Snowman find his way through town before he melts away in this unplugged coding worksheet for kids! This free worksheet is great to print to use in a classroom or even at home!
We like to practice verbalizing our sequences as well because it helps to practice coding concepts in different ways in order to master them!
Meet Toni, the Maker Mom behind Our Family Code

Hey there, I’m Toni! I’m a software engineer and Maker Mom that finds my joy in unleashing my children’s curiosity by exploring STEAM concepts with my fantastic five!
When I’m not chasing toddlers or raising tweens, you can find me tearing things up and putting them back together over here at Our Family Code.
I am the owner and content creator of multiple educational websites designed to increase access to STEAM & STEM education with a focus on teaching computer science and coding to kids of all ages!
You can also find out more about me by visiting ToniGardner.com!