Fun Activities to Teach Coding in Elementary School

Hero image
Updated | 5 min read

When you look over the long list of things you’re expected to teach every year, coding may not be your favorite subject on the list. Coding? In elementary school? Do little kids really need to figure out those long strings of letters and numbers that show up on your laptop screen when you accidentally hit a few wrong buttons?

Well, yes … and no. Whether you’re looking for ways to get some very excited students involved in the annual Hour of Code program (set for December 12 in 2021) or just trying to figure out how to fit coding in with all your ELAR, math, science, and social studies lessons, we’ve got you covered with some coding activities that are actually appropriate for elementary schoolers … plus easy ways to teach coding, even when you feel like you’re completely out of your depths!

Why Teach Coding in Elementary School?

So coding is a lot of random letters and funky characters on the computer screen, right? Well, yes — a computer programmer works with complex languages to write the code that keeps everything from your smartphone to this website running.

But the coding kids need to learn is like most of what we teach in elementary school, the building blocks of coding that have been stripped completely down to just the essential parts. And computer science concepts can be complementary to many of the other lessons you’re teaching.

Coding itself predates the modern computer by hundreds of years. Ismail al-Jazari, a Muslim polymath who’s considered the father of modern robotics and engineering lived in the 1100s, during the Islamic Golden Age. During his life, al-Jazari constructed automata or self-operating machines, which could play different musical beats and rhythms depending on an order of pegs and cams which could be altered by the machine’s “programmer.” Think of it this way — a programmer sets a pre-defined order of events in progress for a self-operating machine, aka a code.

These early automata followed essentially the same processes and used the same basic concepts as today’s modern computers. IF a certain parameter occurs THEN perform a function or ELSE do this other function.

If, then logic guides our higher-order thinking, and teaching kids simple coding and the concepts of programming is part of helping our students develop logical thought processes.

According to the experts at the International Society for Technology in Education (ISTE), teaching coding in kindergarten through fifth grade helps to:

  • Address the gender gap in STEM
  • Spark an interest in puzzles, logic, and the overall concept of computer science, making math more fun.

Coding Activities for Elementary School

So you don’t have to become a computer programmer overnight in order to be able to teach your students to code. Phewwww. Even better? We put together some coding activities perfect for elementary school!

Hour of Code

Each December, kids all around the world participate in a single hour of coding, and the folks behind this fun global activity provide dozens of student-led coding activities. Pick from activities for pre-K on up that can be done on a variety of devices, including computers or your classroom tablets.


There are myriad apps out there for kids to learn to code, and ScratchJr is one of our favorite coding apps for young kids — it’s aimed at the 5 to 7 age group. The free app encourages young kids to learn to solve problems, design projects, and express themselves creatively on the computer.

Classmate Coding

Why not go old school like al-Jazari and ditch the computer for some hands-on, physical programming?

Unplugged coding is the term which is used most often for programming or ‘coding’ in a physical, real-world sense, rather than electronically or computer-based.

Let’s say I want to type “Hello, World!” and have it appear on my computer screen.

  • I have to give the computer input, which is me pressing the characters on a keyboard.
  • The computer then runs through a series of IF, THEN and ELSE processes which result in the monitor displaying “Hello, World!”, or providing output.

The keyboard is an input device, the monitor an output device. Unplugged coding works in exactly the same way. You must give some input which is then processed and the results are a version of output.

The comparison is, lying in the sun on a tropical island sipping a mojito with the sunlight glinting off the condensation as it slowly trickles down the side of your glass, ice clinking melodically as it melts and settles (take me there), and you begin to feel the heat from the sun become a little too intense, this is input. You turn over to warm your other side — this is output. It’s a version of cause and effect.

Where unplugged coding differs from a human decision, is that the brain is not in charge of the actions. Instead, the program is in charge. To practice unplugged coding, Classmate Coding – Flashcards and Activities, is a perfect introduction for students (and teachers) to experience the basics of classroom coding, without even touching a computer.

Teaching coding in primary schools

The coding resource is designed to take the students through a step-by-step series of activities that progressively get harder and harder.

There are eight separate activities in four distinct stages which are put together in a way that each stage must be understood before the students can progress to the next stage.

Teaching Coding in Primary Schools resource

The activity cards are accompanied by coding tiles which are as simple as ‘move forward’ and ‘turn left’ down to more complex tiles for looping and initiating programs.

Each activity involves using a combination of these coding tiles in order to complete a task, and the automaton they will be coding to complete each task is a classmate or even the teacher!The last tile is a loop tile. It will loop a set of instructions or a ‘program’ a certain number of times (including infinity).

Pirate Adventure

Investigate algorithms with your class with a pirate adventure! Your students won’t even realize they’re coding as they help Pirate Pete sail to Treasure Island and back again with this fun coding worksheet.

Pirate Pete's Algorithm Adventure - Coding Teaching Resource

Looking for more coding activities for kids? Check out our full array of coding resources for teachers!


banner image via Shutterstock/insta_photos


Log in to comment

Get more inspiration
delivered to your inbox!

Receive the Teach Starter newsletter full of tips, news and resources with your free membership.

Sign Up