Projects

Coding activities for kids: 15 ideas by age, with and without a screen

15 coding activities for kids by age, from a robot sandwich game to a Python chatbot. Each one lists the time, what you need and the coding idea it teaches.

The Educifly team

·

·

14 min read

Illustration of coding activities for kids: arrow cards on a floor grid guide a blue robot to a star, next to a bead pattern and Scratch-style blocks.


The best coding activities for kids match their age. At 5 to 7, use off-screen games and picture blocks. At 7 to 10, try block coding. At 10 to 13, move on to apps and small AI projects. From 13, try typed code. Below are 15 activities, each with the time it takes, what you need and the coding idea it teaches.

Key takeaways

  • Most activities take 15 to 30 minutes and use things you already have at home.

  • You don’t need to know any code for the first ten.

  • Off-screen games teach the same ideas as screen ones: steps, loops, “if” rules and fixing bugs.

  • Every activity has a “make it harder” step, so it grows with your child.

All 15 coding activities for kids at a glance

#

Activity

Ages

Screen?

Time

Coding idea

1

Robot chef

5 to 7

No

15 min

Clear steps in order

2

Floor arrow maze

5 to 7

No

20 min

Sequences and loops

3

Pattern necklace

5 to 7

No

15 min

Patterns and repeats

4

First ScratchJr story

5 to 7

Tablet

20 min

Steps on a screen

5

Clap and jump

7 to 10

No

10 min

“If” rules

6

Secret code wheel

7 to 10

No

20 min

Codes and keys

7

Bug hunt drawing

7 to 10

No

15 min

Finding and fixing bugs

8

Scratch chase game

7 to 10

Laptop

30 min

Events and “if” rules

9

Card sorting race

10 to 13

No

20 min

Algorithms

10

Scratch quiz with a score

10 to 13

Laptop

30 min

Variables

11

Thumbs-up detector

10 to 13

Laptop with a webcam

20 min

Machine learning

12

Sound board phone app

10 to 13

Laptop and phone

45 min

Apps and events

13

Number guessing game

13 and up

Laptop

30 min

Loops in typed code

14

One-page website

13 and up

Laptop

45 min

HTML and CSS

15

Rule-based chatbot

13 and up

Laptop

30 min

How simple chatbots work

Coding activities for ages 5 to 7

At 5 to 7, coding activities should be short, physical and a bit silly. Kids this age learn by moving and talking, not typing. These four also work well as coding activities for kindergarten.

1. Robot chef: code a jam sandwich

Your child gives the steps, and you are the robot. You follow every step exactly as they say it. If they say “put jam on the bread” before “open the jar”, you tap the closed jar on the bread.

You need: bread, jam, a plate and a butter knife. A grown-up handles the knife.

Time: about 15 minutes.

The coding idea: a computer does exactly what you tell it, in the order you tell it. Fixing the wrong steps is called debugging.

Make it harder: your child draws the steps as pictures first. Then you follow the pictures.

2. Floor arrow maze

Make a 4 by 4 grid on the floor with masking tape. Put a soft toy in one square. Your child lays paper arrows to guide you from the start square to the toy.

You need: masking tape, paper arrows (forward, turn left, turn right) and a soft toy.

Time: about 20 minutes.

The coding idea: a sequence is a set of steps in the right order.

Make it harder: add a “repeat 2” card. Now “repeat 2, forward” means two steps forward. That’s a loop, a set of steps the computer repeats.

3. Pattern necklace

Your child makes a necklace from beads, buttons or dry pasta, using a pattern like red, red, blue. Then they say the pattern out loud as a rule.

You need: string, plus beads or pasta tubes and felt-tip pens.

Time: about 15 minutes.

The coding idea: “Red, red, blue, five times” is a loop. Coders spot repeats and write them once.

Make it harder: you make a necklace with one bead in the wrong place. Can your child find the bug?

4. First ScratchJr story

ScratchJr is a free app made for ages 5 to 7, its makers say. Kids snap picture blocks together to make a character move, jump and talk. A good first project: make the cat walk to a tree, jump and say “hello”.

You need: a tablet with the free ScratchJr app.

Time: about 20 minutes.

The coding idea: the same steps as the floor maze, now on a screen.

Make it harder: add a second character who walks over when the first one says hello.

For how classes work at this age, see our page on coding for preschoolers.

Coding activities for ages 7 to 10

From about 7, kids can follow longer rules and start block coding. Mix off-screen games with screen projects, so ideas stick before they turn into blocks.

5. Clap and jump: the “if” game

Set two rules: “If I clap, jump. If I snap my fingers, sit down.” Then mix them up fast. Swap roles, so your child makes the rules.

You need: space to move. It’s more fun with three or more players.

Time: about 10 minutes.

The coding idea: an “if” rule tells a computer what to do when something happens. Coders call it a conditional.

Make it harder: add an “else” rule: “If I clap, jump. Else, stand still.” Now everyone has to watch closely.

6. Secret code wheel

Draw two circles, one smaller than the other, and write the alphabet around the edge of each. Pin them together in the middle. Turn the small wheel 3 letters along, so A lines up with D. Your child writes a secret message for you to crack.

You need: card, scissors, a pencil and a split pin.

Time: about 20 minutes.

The coding idea: a code turns information into something else using a rule, called a key. Computers code information all the time.

Make it harder: change the key to 5, and see if you can still crack the message.

7. Bug hunt drawing

You write five steps for drawing a house, with one mistake. For example: “Draw a square. Draw a triangle under the square.” Your child follows the steps, spots the bug and fixes it.

You need: paper and a pencil.

Time: about 15 minutes.

The coding idea: debugging means finding and fixing the step that went wrong. Real coders spend a lot of their time doing it.

Make it harder: your child writes buggy steps for you to fix.

8. Scratch chase game

In Scratch, make the cat chase the mouse pointer and say “Got you!” when it catches it. Scratch is free and runs in a web browser.

You need: a laptop or computer.

Time: about 30 minutes.

  1. Go to scratch.mit.edu and click Create. From the yellow Events group, drag “when flag clicked” into the big space.

  2. From the orange Control group, snap “forever” under it.

  3. From the blue Motion group, put “point towards mouse-pointer” and “move 10 steps” inside “forever”.

  4. From Control, add “if then” inside “forever” too. From the light blue Sensing group, drop “touching mouse-pointer?” into its gap.

  5. From the purple Looks group, put “say Hello! for 2 seconds” inside the “if”. Change Hello! to Got you!

  6. Click the green flag and move your mouse.

The coding idea: events start code, loops keep it running and “if” rules make choices.

Make it harder: change 10 to a bigger number. How fast can the cat go before the game feels unfair?

For more projects at this age, see Scratch coding for kids.

Coding activities for ages 10 to 13

At 10 to 13, kids can stick with one project for a few sessions. These four are also good coding activities for middle school, at home or in a club.

9. Card sorting race

Lay ten playing cards face up in a row, in a random order. Your child can look at only two cards side by side at a time. If the bigger card is on the left, they swap them. They walk along the row again and again until no swaps are needed.

You need: a pack of cards and a timer.

Time: about 20 minutes.

The coding idea: an algorithm is a set of steps that always solves a problem. This one is a real sorting method, called bubble sort.

Make it harder: try a different way, like finding the smallest card first each time. Count the swaps. Which way wins? CS Unplugged, free teaching material from the University of Canterbury in New Zealand, has more sorting games.

10. Scratch quiz with a score

Make a five-question quiz in Scratch that keeps score.

You need: a laptop and Scratch.

Time: about 30 minutes.

  1. In the orange Variables group, click Make a Variable and name it score.

  2. Use “ask and wait” from the Sensing group for each question.

  3. Use “if then” with “answer = 12” from the green Operators group to check each answer.

  4. Inside each “if”, add “change score by 1”.

  5. At the end, make the sprite say the score.

The coding idea: a variable is a named box that holds a value, like a score.

Make it harder: set score to 0 at the start, and add a special message for five out of five.

11. Thumbs-up detector

Use Teachable Machine, a free Google tool, to teach a computer to tell a thumbs-up from a thumbs-down. Google says the examples stay on your computer unless you choose to save the project to Google Drive.

You need: a laptop with a webcam.

Time: about 20 minutes.

  1. Open Teachable Machine, click Get Started, then choose Image Project and Standard image model.

  2. Rename Class 1 to Thumbs up and Class 2 to Thumbs down.

  3. In each class, click Webcam. Press and hold the button under the camera while you show that hand sign. Take about 50 pictures for each.

  4. Click Train Model, then test it in the Preview panel.

The coding idea: machine learning means a computer learns a pattern from examples, instead of following typed rules.

Make it harder: add a third class called No hand. Does the model get confused? For more tools like this, read our guide to AI tools for kids.

12. Sound board phone app

Make a phone app with three buttons that each play a funny sound. Use MIT App Inventor, which is free and uses blocks. It needs a sign-in, so for a child under 13, set up and keep the account yourself.

You need: a computer, plus an Android phone or iPhone with the free MIT AI2 Companion app.

Time: about 45 minutes.

  1. Add three Buttons and three Sound parts to the screen.

  2. Upload a sound file to each Sound part.

  3. In the Blocks view, use “when Button1.Click” with “call Sound1.Play” inside it. Do the same for the other two.

  4. Test it on your phone with the Companion app.

The coding idea: apps run code when something happens, like a tap. These are called events.

Make it harder: add a fourth button that plays a sound picked at random.

Coding activities for teens, 13 and up

Teens can go straight to typed code. These coding projects for kids aged 13 and up take an evening each.

13. Number guessing game in Python

The computer picks a secret number. Your teen keeps guessing until they get it.

import random

secret = random.randint(1, 20)
guess = 0

while guess != secret:
    guess = int(input("Guess a number from 1 to 20: "))
    if guess < secret:
        print("Too low!")
    elif guess > secret:
        print("Too high!")

print("You got it!")
import random

secret = random.randint(1, 20)
guess = 0

while guess != secret:
    guess = int(input("Guess a number from 1 to 20: "))
    if guess < secret:
        print("Too low!")
    elif guess > secret:
        print("Too high!")

print("You got it!")
import random

secret = random.randint(1, 20)
guess = 0

while guess != secret:
    guess = int(input("Guess a number from 1 to 20: "))
    if guess < secret:
        print("Too low!")
    elif guess > secret:
        print("Too high!")

print("You got it!")

You need: a computer with Python, which is free and comes with an editor called IDLE. Save the file as guess.py. Don’t call it random.py, or Python mixes it up with its own random tools.

Time: about 30 minutes.

The coding idea: a “while” loop keeps going until something is true. “if” and “elif” make choices.

Make it harder: count the guesses and print the total at the end.

14. One-page website about a hobby

Your teen makes a web page about something they love, like cricket or a band.

<!DOCTYPE html>
<html>
<head>
  <title>Why I love cricket</title>
  <style>
    body { font-family: sans-serif; background: #f2f6ff; }
    h1 { color: #2d4bff; }
  </style>
</head>
<body>
  <h1>Why I love cricket</h1>
  <p>My favourite shot is the cover drive.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
  <title>Why I love cricket</title>
  <style>
    body { font-family: sans-serif; background: #f2f6ff; }
    h1 { color: #2d4bff; }
  </style>
</head>
<body>
  <h1>Why I love cricket</h1>
  <p>My favourite shot is the cover drive.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
  <title>Why I love cricket</title>
  <style>
    body { font-family: sans-serif; background: #f2f6ff; }
    h1 { color: #2d4bff; }
  </style>
</head>
<body>
  <h1>Why I love cricket</h1>
  <p>My favourite shot is the cover drive.</p>
</body>
</html>

You need: a computer and a web browser. Type the code in a plain text editor, save it as index.html, then open it in the browser.

Time: about 45 minutes.

The coding idea: HTML gives a page its parts, like headings and paragraphs. CSS sets the colours and fonts.

Make it harder: add a photo with the img tag, and a second page linked from the first.

15. Rule-based chatbot in Python

This bot replies using rules your teen types in. It’s a good way to see how simple chatbots worked before AI.

print("Hi! I'm Bot. Type bye to stop.")

while True:
    text = input("You: ").lower()
    if text == "bye":
        print("Bot: See you!")
        break
    elif "hello" in text:
        print("Bot: Hello to you too!")
    elif "joke" in text:
        print("Bot: Why did the computer sneeze? It had a virus.")
    else:
        print("Bot: I don't know that one yet.")
print("Hi! I'm Bot. Type bye to stop.")

while True:
    text = input("You: ").lower()
    if text == "bye":
        print("Bot: See you!")
        break
    elif "hello" in text:
        print("Bot: Hello to you too!")
    elif "joke" in text:
        print("Bot: Why did the computer sneeze? It had a virus.")
    else:
        print("Bot: I don't know that one yet.")
print("Hi! I'm Bot. Type bye to stop.")

while True:
    text = input("You: ").lower()
    if text == "bye":
        print("Bot: See you!")
        break
    elif "hello" in text:
        print("Bot: Hello to you too!")
    elif "joke" in text:
        print("Bot: Why did the computer sneeze? It had a virus.")
    else:
        print("Bot: I don't know that one yet.")

You need: Python and IDLE.

Time: about 30 minutes.

The coding idea: this bot only follows rules. AI chatbots learn patterns from huge amounts of text instead. Building the simple one shows the difference.

Make it harder: add five more rules, and a reply for questions that end with a question mark.

How do you get the most out of a coding activity?

Three habits turn a fun activity into real learning.

  1. Predict first. Before you run anything, ask “What do you think will happen?”

  2. Change one thing. Once it works, change one number, rule or step, and test it again.

  3. Show someone. Explaining the steps out loud shows what your child really understands.

When your child gets stuck, ask questions instead of fixing it for them. Our guide on how to teach kids coding has a full plan by age. New to all this? Start with what is coding for kids.

Are coding activities enough, or does a class help?

Activities are enough to start, and lots of kids stay happy with them for months. A class helps when your child wants bigger projects, stays stuck for weeks, or needs a steady routine. When should your child move from games to blocks to typed code? Read about the best age to start coding.

At Educifly, classes are live and one-to-one, with one mentor for the whole level. Every class runs in five parts: Hook, Play, Build, Remix and Show. They build something in every class, and the mentor coaches without building it for your child.

Questions parents ask about coding activities

What are unplugged coding activities for kids?

Unplugged coding activities teach coding ideas without a computer. Kids use cards, paper, tape or their own bodies to practise steps, loops, “if” rules and fixing mistakes. The robot chef, floor arrow maze and clap and jump games in this guide are all unplugged.

What are good coding activities for kindergarten?

Keep them short, physical and spoken. The robot chef, floor arrow maze and pattern necklace all work for kindergarten. Each takes 15 to 20 minutes and needs no reading. If your child enjoys them, the free ScratchJr app is a good next step.

Are there coding activities for preschoolers?

Yes, as long as they stay as play. Under 5, simple games like giving directions or making repeating patterns with blocks build the same thinking. Screen-based coding can wait until 5 or later.

Do coding activities need a computer?

No. Seven activities in this guide need no screen at all: numbers 1, 2, 3, 5, 6, 7 and 9. A tablet helps for ScratchJr at 5 to 7. A laptop or computer works best for Scratch and typed code.

What coding activities suit middle school students?

Middle school students, about 11 to 14, are ready for projects that take a few sessions. Try the Scratch quiz with a score, the thumbs-up detector or the phone app. From about 13, a first Python game works well. Card sorting is a good off-screen choice that teaches a real algorithm.

Want a mentor for the next step?

If your child loves these activities, a free trial class is an easy next step. It’s 40 minutes, live and one-to-one, with no payment and no card. Your child builds a mini-project with a mentor. In the free class, the mentor finds the right starting level.

Book a free trial class

Related class

Coding for young kids, ages 5 to 7

See what your child can build in 40 minutes

Book the free class. Your child meets their mentor and builds a small project. You get the right starting level and the exact price. Then you decide.

Ages 5–18 · Live and one-to-one · No payment needed

See you in class!