Pickles AcademyStart for free

A program for the robot – practice for Years 4–6

Sample questions on A program for the robot with the right answer and a worked solution, from easy to hard. In the Pickles Academy app a child gets new questions of the same kind every time, so they can't just learn the answers by heart.

Subject
Computing
Year
Years 4–6
Curriculum area
Algorithms and programming

Question types: Which program reaches the star?

Rule: A program for the robot

Trace each program step by step from the start. Rule out any that leaves the board or hits a wall.

The right program stops exactly on the star; just passing over it is not enough.

Example: The star is 2 squares right and 1 down: → → ↓ and ↓ → → both reach it if no wall is in the way.

Watch out: Order matters: ↓ → → may hit a wall even though → → ↓ gets through.

Sample questions

  1. Question 1 Easy

    Which program takes the robot to the star? It must not leave the board or drive into a wall. Each arrow moves the robot one square that way.

    1. A) ← ← ↓
    2. B) ← ← ↓ ↑
    3. C) ← ← ↑
    4. D) ← ↑ ← ↑
    5. E) ← ←
    Show the solution
    Answer: C) ← ← ↑

    How it works: ← ← ↑ reaches the star. The other programs stop somewhere else or crash.

  2. Question 2 Normal

    Which program takes the robot to the star? It must not leave the board or drive into a wall. Each arrow moves the robot one square that way.

    1. A) ↓ ↓ → ↓ → ↑
    2. B) ↓ ↓ ↓ → ↑
    3. C) ↓ ↓ → ↓ →
    4. D) ↓ ↓ → → ↓ → ↑
    5. E) ↓ ↓ → ← → ↑
    Show the solution
    Answer: A) ↓ ↓ → ↓ → ↑

    How it works: ↓ ↓ → ↓ → ↑ reaches the star. The other programs stop somewhere else or crash.

  3. Question 3 Hard

    The robot faces the way its arrow points. Which program takes the robot to the star? It must not leave the board or drive into a wall. ⬆ = one step forward, ↺ = turn left, ↻ = turn right (on the spot).

    1. A) ↺ ⬆ ⬆ ↻ ⬆
    2. B) ↺ ⬆ ↺ ⬆ ↻ ⬆
    3. C) ↺ ⬆ ↺ ⬆ ↻ ↻ ⬆
    4. D) ↺ ⬆ ↺ ⬆ ↺ ⬆
    5. E) ↺ ⬆ ↺ ⬆ ⬆ ↻ ⬆
    Show the solution
    Answer: B) ↺ ⬆ ↺ ⬆ ↻ ⬆

    How it works: ↺ ⬆ ↺ ⬆ ↻ ⬆ reaches the star. The other programs stop somewhere else or crash.

All Computing topics

Keep practising in the app

In a minute, your child has their own avatar and a first task. Free, no ads, data in the EU.

Start for free