This heart tree directed drawing teaches kids to follow an algorithm to make tech art! This screen-free activity is a great Mother’s Day or Valentine’s Day unplugged coding activity!
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 Love Tree code.
Similar coding activities are also available on coding websites and applications for kids including Scratch, Kodable, and Code.org.
This algorithm art love tree activity is a great unplugged coding activity for kids K-8 to learn how actions can be turned into algorithms.
This post contains affiliate links. As an Amazon Associate, Our Family Code earns from qualifying purchases. Please see our Disclosure Policy for more details.
Algorithm Art Heart Tree
An algorithm is a defined list of steps for performing a task. This type of instruction is also found in directed drawing activities. We decided to take our directed drawing a step further and create an opportunity to work on computational thinking skills as well.
I have four kids that range in age from 11 years old to 1 year old. They heart tree 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.
Love Tree Pseudocode
Draw your own tree trunk on a sheet of paper. We started with just the two sides of the tree trunk and no limbs branching out.
Without looking at any pictures of the completed Love tree algorithm art in this post, follow the pseudocode below to draw your Love Tree.
- Draw a long line that extends out from the tree trunk.
- Draw three small diagonal lines branching off the left side of your long line.
- Draw a heart at the end of every small line.
- Draw three small diagonal lines branching off the right side and symmetrical to the small lines on the left side.
- Draw a heart at the end of every small line.
- Repeat until there is no longer any more space
By following the pseudocode, you should end up creating a Love Tree like the ones below. Don’t worry if your Love Tree is slightly different though!
Code a Heart Tree – Write Your Program
This heart tree directed drawing activity can be adapted to more advanced kid coders by having them translate the Love Tree pseudocode into commands, functions, and loops.
Use the following commands to code your Love Tree:
- Draw a long line that extends out from the tree trunk = draw line ( )
- Draw three small diagonal lines branching off the left side of your long line = draw left ( )
- Draw a heart at the end of every small line = draw heart ( )
- Draw three small diagonal lines branching off the right side and symmetrical to the small lines on the left side = draw right ( )
Write a Function for your Love 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 “branch” because the entire function should complete a single branch with six twigs that end in hearts. You can name your function whatever you’d like.
Function – branch
func branch ( ) {
draw line ( )
draw left ( )
draw heart ( )
draw right ( )
draw heart ( )
}
Write a Loop for your Love Tree
To call a function multiple times, we’ll need to write a loop and enter the number of times to repeat it.
For this algorithm art love tree activity, you should be able to loop at least 10 times. You can determine the number of times you’d like your code to repeat using the code below.
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.
Heart Tree Code
for i in 1 … 10 {
branch ( )
}
Practice with Friends – Take Turns Being the Computer
Another fun way to do this activity is to work in a large group to identify your commands.
After you have established the commands and function, you can practice by writing your own code for a friend and see how they act as the machine and run your program.
Change up the number of loops and see what happens. Did their love tree turn out the way you thought it would?
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.
Unplugged coding activities 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 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
- Working together with others to reach a common goal
- Persevering when faced with a difficult problem
- Finding and fixing errors in complex problems
- Designing and making solutions for open-ended problems
- Understanding their own strengths and weaknesses
Computer Programming Books for Kids
We love incorporating books into our activities. Here are some great books about coding to read with heart tree directed drawing 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
Find more Coding Activities for Kids
- 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
Looking for more hands-on Valentine’s Day STEAM Activities?
This STEAM Kids books features 14 activities that are perfect for Valentine’s Day including:
Inside you’ll find entertaining and educational projects like:
– Super Sized Crystal Hearts
– Valentine’s Day Speakers
– Magnetic Attraction
– Rocket Valentines
– LED Roses
– STEAM Challenge Cards
PIN THIS IMAGE TO SAVE THIS ACTIVITY FOR LATER!
Directed Drawing Coding Activity for Kids
Learn how algorithms work by following directed drawing instructions to create tech art with these unplugged coding algorithm art activities for kids!
How to Code a Lion Directed Drawing Algorithm Art
Can you follow the algorithm and draw a lion in this directed drawing unplugged coding + art activity based on the Magic Tree House series!
Circle Algorithm Art Unplugged Coding Activity
This circle algorithm art activity introduces basic coding skills by giving kids a set of rules and steps to follow to create unique designs in each circle!
Christmas Algorithm Art Unplugged Coding Activity
This Christmas tree algorithm art activity is an unplugged coding activity for kids K-8 to learn how everyday actions can be turned into a computer program.
Easter Egg Algorithm Art Unplugged Coding Activity
This Easter egg algorithm art activity introduces basic coding skills by giving kids a set of rules and steps to follow to create unique designs in each Easter egg!
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!