Olibits

Olibits / Coding

Coding practice for Singapore Primary 4–6

Olibits' Coding practice introduces the core ideas behind programming — sequences, loops, conditionals, variables, and debugging — through short lessons and bite-sized practice questions, no coding experience required to start.

What's covered

SequencingLoopsConditionalsVariablesAlgorithmsDebugging

Where students commonly get stuck

  • Mixing up the order steps actually run in, especially once a loop or a condition changes what happens next.
  • Tracing through a loop by hand to work out how many times it repeats or what it prints.
  • Spotting the one wrong step in an otherwise-correct sequence of instructions.

Parent tip

There's no MOE syllabus for Coding at the primary level — this is original enrichment content, not a claim of syllabus coverage. Encourage your child to read each step out loud before deciding the order; most mistakes come from skimming the instructions, not from the underlying idea being too hard.

Real Coding practice questions

Pulled directly from the live Olibits question bank: the same questions a child would actually see, not separately written for this page.

P4 · What is an Algorithm?

What is an algorithm?

A set of step-by-step instructions to solve a problem

A type of computer game

A machine that does calculations

A programming language used to write code

An algorithm is a set of step-by-step instructions that tells us how to solve a problem or complete a task. It's like a recipe that we follow in order.

P5 · Loops: Repeat & Count

A robot repeats the command "move forward 2 steps" 5 times. How many steps does the robot move in total?

2 steps

5 steps

7 steps

10 steps

When you repeat an action, you multiply the number of times by what happens each time. The robot moves 2 steps each time, and it repeats 5 times, so 2 × 5 = 10 steps in total.

P6 · Nested Loops & Conditionals

What will be printed by this code? ``` for i in range(1, 4): for j in range(1, 3): print(i * j) ```

1 2 2 4 3 6

1 2 3 2 4 6

1 1 2 2 3 3

1 2 3 4 5 6

The outer loop runs with i = 1, 2, 3. For each i, the inner loop runs with j = 1, 2. So we get: i=1,j=1 → 1×1=1; i=1,j=2 → 1×2=2; i=2,j=1 → 2×1=2; i=2,j=2 → 2×2=4; i=3,j=1 → 3×1=3; i=3,j=2 → 3×2=6. The output is 1 2 2 4 3 6.

Browse by grade & topic

Related subjects