This post may contain affiliate links. As an Amazon Associate I earn from qualifying purchases.
Today I’m bringing you another super simple unplugged coding activity for kids! We’re going to be exploring if/then conditional statements with this simple cause and effect activity. In this easy STEM activity, kids will learn the importance of events, which are a vital part of computer programming language.
This unplugged activity introduces some of the basic concepts of coding. It is so important to understand these basic coding ideas before considering coding with a computer or app! These basic ideas are the fundamentals not only of teaching kids code, but also provide kids with invaluable problem-solving skills. If you’re not already convinced, check out the 8 reasons why every child should learn to code to learn more about all the benefits of coding for kids.
What is an event?
Events are actions or occurrences that a computer recognizes and detects. When a computer detects that an event has occurred it may be given specific instructions (program) on how to react.
An example of an event could be the act of clicking a mouse. When we click the mouse, the computer responds with an action based on our click. Maybe it opens a game or an app. This is the concept of an if/then conditional statement.
What is a conditional statement?
A conditional statement tells a computer to execute a different action depending on a specific event. If the mouse is clicked, the computer opens the program. If the mouse is not clicked, the computer does nothing. These simple statements help to make up the complex programming algorithms we use every day.
Before getting started on this activity, you can explore real life if/then cause and effect statements with your kids.
Ideas to consider:
- If you make a loud noise near a sleeping baby, what will happen?
- If the mailman rings the doorbell and the dog is home, what will happen?
- What happens when an ice cube goes out into the sun?
Have your kids think of their own cause-and-effect statements!
If/Then Glow Stick Coding Activity
What do you need?
- Glow stick necklaces (6-50, depending on the number of players)
- A dark room
How to setup:
First, start by putting your glowstick necklaces down in a grid. It is helpful to tape the glowsticks to the floor so that they aren’t knocked away. You will want to spread them out far enough that kids can jump from one to the next. This game can be played with a large group (class) if you have enough necklaces to lay down.
How to play: Glowstick Cause and Effect Coding Activity
Assign roles. You will need one ‘programmer‘ and one or more ‘computers‘. Change up the roles as the game evolves!
In this activity, the ‘programmer‘ will give specific instructions (events) that will cause the ‘computer‘ to perform certain actions.
The most simple way to play this game is to have the programmer call out colors and have the computers race to step on the color. Get your kids to use programming language when they call out the tasks.
‘If I say BLUE, then run to the BLUE rings’
‘If I say GREEN, go to the GREEN rings’
For an extra challenge, use an unrelated event to direct a specific task. In this version of the game, we will use claps to code the various colors of the glow stick rings. The number of claps tells the computer which color to run to. For example, if the programmer makes TWO claps then the computer needs to run to the BLUE glow stick.
It may be helpful to use a visual representation like this one so that the kids can look at it when they are playing this game.
For an extra challenge:
With a group of kids, you can add an elimination challenge to this game. If the commands aren’t followed correctly then that computer will have a ‘bug’ and require attendance at the ‘repair shop’. The last computer standing wins!
Be sure to check out my other unplugged coding activities for more ideas! If you are looking for more resources to help teach our kids beginner code check out my favorite websites code.org and tynker.com.
Pin for Later!
Pin this cause and effect coding activity for later!
Katie is mom of two rambunctious boys and a self-proclaimed super nerd. With a background in neuroscience, she is passionate about sharing her love of all things STEM with her kids. She loves to find creative ways to teach kids computer science and geek out about coding and math. You can find her blogging at Teach Your Kids Code and in her spare time, documenting her families travels at Tear Free Travel.