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 in our case) to test out and debug their Christmas tree code.

Similar coding activities are also available on coding websites and applications for kids including Scratch, Kodable, and Code.org.

What is Christmas Algorithm Art?
An algorithm is a defined list of steps for performing a task. I have four kids that range in age from 10 years old to 10 months old. They love algorithm doodling because you never really know what you are going to get sometimes since they interpret verbal instructions differently because of their ages.
Pseudocode is a mix of everyday language and code that describes an algorithm. Pseudocode is a great way to illustrate how everyday actions can be translated into code.
Christmas Tree Pseudocode
Grab the free Christmas Tree Algorithm workbook (link at the end of the post!) or draw your own blank triangle tree on a sheet of paper.
Without looking at any pictures of the completed Christmas tree art, follow the pseudocode below to draw your Christmas tree.
- Draw a small triangle with corners that touch each side of the larger triangle.
- Draw a small colored circle in a corner of your new triangle.
- Choose a newly drawn triangle and repeat.

By following the pseudocode, you should end up decorating your Christmas tree like the one below. Don’t worry if your Christmas tree is slightly different!

You might also enjoy: 18+ Robots that Teach Kids Coding and Engineering Skills
Code a Christmas Tree – Write Your Program
This activity can be adapted to more advanced kid coders by having them translate the Christmas Tree pseudocode into commands, functions, and loops.
Use the following commands to code your Christmas Tree:
- Draw a small triangle with corners that touch each side of the larger triangle = draw triangle ( )
- Draw a small colored circle in a corner of your new triangle = draw circle ( )
Write a Function for your Christmas Tree
A function is a group of commands that can be run with one line of code rather than using multiple lines.
To define a function, enter a set of commands between the { and } curly brackets to define the repeated behavior.
func _____________ ( ) {
______________ ( )
______________ ( )
}
I’m going to call my function “decorate” because making a triangle and circle is like decorating my tree. You can name your function whatever you’d like.
func decorate ( ) {
draw triangle ( )
draw circle ( )
}
Write a Loop for your Christmas Tree
To call a function multiple times, we’ll need to write a loop and enter the number of times to repeat it.
for i in 1 … __{
______________ ( )
}
To write the loop, plug in your function and the number of times that your function needs to repeat.
for i in 1 … 6 {
decorate ( )
}
Code a Christmas Tree – Printable Unplugged Coding Activity
Grab this free printable workbook and code a Christmas tree today!


WHY ARE UNPLUGGED CODING ACTIVITIES IMPORTANT?
Unplugged coding activities are designed to build the foundation of coding. These activities allow kids to participate in kinesthetic opportunities that help them relate the concepts they are learning to their own lives.
They also teach children how to think logically about objects, how to break down large tasks into smaller tasks that are easier to complete, and how to identify errors.
Working hands-on makes coding concepts tangible and unplugged coding activities are ideal for young coders. Unplugged activities are great for classrooms or homes that don’t have access to the internet or a computer and ideal for young students who don’t have the experience working with computers.
It’s never too early to start teaching the foundation of coding.
Recommended: Bitmap Coding Unplugged Coding Activity for Kids
What is Computational Thinking?
Computational thinking can be used to solve problems in almost all areas of our lives and helps kids develop some pretty great life skills that can apply to a variety of situations.
A computational thinker approaches problems by experimenting and playing to solve a problem that might have more than one possible solution.
Computational thinking activities encourage working together with others to reach a common goal and persevering when faced with a difficult problem.
These activities help kids to find and fix errors in complex problems, design and make solutions for open-ended problems, and help to understand their own strengths and weaknesses.
SOME BOOKS TO READ WITH YOUR ACTIVITY
We love incorporating books into our activities. Here are some great books about coding to read with your activity!
- Lauren Ipsum: A Story About Computer Science and Other Improbable Things by Carlos Bueno
- Who Says Women Can’t Be Computer Programmers? The Story of Ada Lovelace by Tanya Lee Stone
- Hello Ruby: Adventures in Coding by Linda Liukas
- How to Code a Sandcastle by Josh Funk
SIMILAR CODING ACTIVITIES
- Coding the Way Unplugged STEAM Activity
- Get Your Kids Coding With Swift Playgrounds
- Get Your Kids Coding With Osmo
- Crack the Code & Binary Code 5-Bit Challenge
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.
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.
Guess Who? Santa's Elves Unplugged Boolean Coding Activity
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.
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!
PIN THIS IMAGE TO SAVE THIS ACTIVITY FOR LATER!

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!
TechyKids Canada
Friday 11th of December 2020
This is such a great idea and thanks for explaining it so well. I really enjoy reading your blogs, keep sharing!