Grow this garden

Each rule is a loop: it plants a flower, skips ahead, plants again, all the way across the garden. Change the flower, where it starts, how often it repeats, and whether it goes along rows or down columns. Rule 2 plants on top of rule 1.

About Pixel Garden

Ages 7+About 5 minFree, no sign-up

Pixel Garden teaches one of the most important ideas in coding: the loop. Instead of planting flowers one by one, you write rules like 'start at square 2 and plant every 3 squares'. Change the rules to grow your garden until it matches the target pattern. The real code for your rules appears underneath, so you can see how programmers write it.

How to play

Each rule is a loop: it plants a flower, skips ahead, plants again, all the way across the garden. Change the flower, where it starts, how often it repeats, and whether it goes along rows or down columns. Rule 2 plants on top of rule 1.

What it helps you practise

Top tip

Look at the target and count the gap between flowers. That number is your 'every' value.

More games you might like