# Christmas Algorithm Art 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 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.

1. Draw a small triangle with corners that touch each side of the larger triangle.
2. Draw a small colored circle in a corner of your new triangle.
3. 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.

Functions

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.

Function - Decorate

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 Loop

for i in 1 … __{

______________ ( )

}

To write the loop, plug in your function and the number of times that your function needs to repeat.

Christmas Tree Code

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.

We love incorporating books into our activities. Here are some great books about coding to read with your activity!

## Christmas Coding Activities

Find more Christmas coding activities to work on computational thinking and beginning coding skills!

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!

This site uses Akismet to reduce spam. Learn how your comment data is processed.