AmbifulWorksheets
Practice that never repeats
CBSE · Class 7 · Computational Thinking and AI

Grid Navigation and Pathfinding

Standard difficulty · 20 questions · 40 marks · Time: 37 minutes

Name: Date: Score: ____ / 40

Show your working for Sections B and C. Answers are on the last page — try every question first!

Section A — Choose the correct answer8 × 1 = 8 marks
1.
Finding the best route from a start to a goal is called:
  1. encryption
  2. sorting
  3. clustering
  4. pathfinding
2.
A robot is on a 6 × 6 grid. Cells are named (column, row), with (1, 1) at the bottom left. It starts at (1, 4) facing South. F = move forward one cell, F2 = move forward two cells, L = turn left 90°, R = turn right 90° (turning stays in the same cell). It follows: F2 L F2 L F F2. In which cell does it stop? Give (column, row).
  1. (5, 3)
  2. (4, 5)
  3. (3, 4)
  4. (3, 5)
3.
A robot is on a 6 × 6 grid. Cells are named (column, row), with (1, 1) at the bottom left. It starts at (1, 3) facing West. F = move forward one cell, F2 = move forward two cells, L = turn left 90°, R = turn right 90° (turning stays in the same cell). It follows: R F2 R F2 F2 F R F2. Which way is it facing at the end?
  1. North
  2. East
  3. South
  4. West
4.
⬜ ⬜ ⬛ ⬜ ⭐ ⬜
⬛ ⬜ ⬜ ⬛ ⬜ ⬜
⬜ ⬜ ⬜ ⬜ ⬜ ⬜
⬜ ⬜ ⬛ ⬜ ⬛ ⬛
⬜ ⬛ ⬛ ⬛ ⬜ ⬜
⬜ 🤖 ⬜ ⬛ ⬜ ⬜
The robot 🤖 moves one square at a time up, down, left or right (not diagonally), and cannot enter a black square ⬛. What is the fewest number of moves to reach the star ⭐?
  1. 9
  2. 12
  3. 10
  4. 11
5.
⬜ ⬜ ⬜ ⬜ ⬜ ⭐
⬜ ⬛ ⬜ ⬜ ⬛ ⬜
⬜ ⬜ ⬜ ⬛ ⬛ ⬜
⬜ ⬛ ⬜ ⬛ ⬜ ⬜
⬜ ⬜ ⬜ ⬛ ⬜ ⬜
⬜ 🤖 ⬜ ⬜ ⬛ ⬛
The robot 🤖 moves one square at a time up, down, left or right (not diagonally), and cannot enter a black square ⬛. The fewest moves to the star is 9. How many different routes use exactly 9 moves?
  1. 8
  2. 4
  3. 5
  4. 3
6.
On a street grid you walk from corner (0, 0) to corner (3, 3), moving only right (east) or up (north), one block at a time. The corner (2, 2) is closed for repairs. How many different shortest routes are there?
  1. 20
  2. 9
  3. 8
  4. 6
7.
On a grid of streets, a delivery robot goes 8 steps North, then 9 steps South, then 3 steps North, then 3 steps East. It can only move North, South, East or West. What is the fewest number of steps to get back to the start?
  1. 23
  2. 1
  3. 7
  4. 5
8.
A robot on a 6 × 6 grid starts at (4, 3) facing East (cells are (column, row), (1, 1) at the bottom left). F = forward one cell, L and R = turn 90° left or right. Which commands take it to (4, 6)?
  1. L F F R L
  2. L L F F L
  3. L F F F L
  4. L F F L L
Section B — Short answer8 × 2 = 16 marks
9.
What is pathfinding?
10.
A robot is on a 6 × 6 grid. Cells are named (column, row), with (1, 1) at the bottom left. It starts at (3, 4) facing South. F = move forward one cell, F2 = move forward two cells, L = turn left 90°, R = turn right 90° (turning stays in the same cell). It follows: R F F R F2. In which cell does it stop? Give (column, row).
11.
A robot is on a 6 × 6 grid. Cells are named (column, row), with (1, 1) at the bottom left. It starts at (3, 1) facing North. F = move forward one cell, F2 = move forward two cells, L = turn left 90°, R = turn right 90° (turning stays in the same cell). It follows: F2 F F2 R F2 F R F. Which way is it facing at the end?
12.
⬜ ⬜ ⬛ ⬜ ⭐ ⬜
⬜ ⬜ ⬜ ⬛ ⬜ ⬜
⬜ ⬛ ⬛ ⬜ ⬜ ⬛
⬜ ⬜ ⬜ ⬜ ⬛ ⬜
⬜ ⬛ ⬜ ⬜ ⬜ ⬜
⬜ 🤖 ⬛ ⬜ ⬜ ⬜
The robot 🤖 moves one square at a time up, down, left or right (not diagonally), and cannot enter a black square ⬛. What is the fewest number of moves to reach the star ⭐?
13.
⬛ ⬜ ⬜ ⬜ ⭐ ⬜
⬛ ⬛ ⬜ ⬛ ⬜ ⬜
⬜ ⬜ ⬜ ⬜ ⬜ ⬛
⬜ ⬜ ⬜ ⬛ ⬛ ⬛
⬜ ⬜ ⬜ ⬜ ⬜ ⬜
⬜ 🤖 ⬛ ⬜ ⬜ ⬛
The robot 🤖 moves one square at a time up, down, left or right (not diagonally), and cannot enter a black square ⬛. The fewest moves to the star is 8. How many different routes use exactly 8 moves?
14.
On a street grid you walk from corner (0, 0) to corner (5, 5), moving only right (east) or up (north), one block at a time. The corner (1, 1) is closed for repairs. How many different shortest routes are there?
15.
On a grid of streets, a delivery robot goes 7 steps East, then 5 steps North, then 7 steps East. It can only move North, South, East or West. What is the fewest number of steps to get back to the start?
16.
On a 9 × 9 grid with no walls, a robot moves one cell at a time across or up and down (never diagonally). What is the fewest number of moves from (5, 5) to (7, 2)?
Section C — Word problems4 × 4 = 16 marks
17.
On a street grid, moving only right or up from (0, 0) to (3, 2): (a) find the number of shortest routes by labelling corners; (b) how many if (1, 1) is closed?
18.
A robot is on a 6 × 6 grid. Cells are named (column, row), with (1, 1) at the bottom left. It starts at (5, 3) facing South. F = move forward one cell, F2 = move forward two cells, L = turn left 90°, R = turn right 90° (turning stays in the same cell). It follows: F F R R F2 F2 L L R. (a) In which cell does it stop? Give (column, row). (b) Which way is it facing at the end?
19.
⬜ ⬛ ⬜ ⬛ ⭐ ⬜
⬜ ⬛ ⬜ ⬜ ⬜ ⬛
⬜ ⬜ ⬛ ⬜ ⬜ ⬜
⬜ ⬜ ⬜ ⬜ ⬜ ⬛
⬜ ⬜ ⬛ ⬜ ⬛ ⬜
🤖 ⬜ ⬜ ⬜ ⬜ ⬜
The robot 🤖 moves one square at a time up, down, left or right (not diagonally), and cannot enter a black square ⬛. The fewest moves to the star is 9. How many different routes use exactly 9 moves?
20.
(a) On a street grid you walk from corner (0, 0) to corner (5, 3), moving only right (east) or up (north), one block at a time. The corner (4, 1) is closed for repairs. How many different shortest routes are there?
(b) On a grid of streets, a delivery robot goes 3 steps South, then 1 steps South, then 8 steps East, then 6 steps North. It can only move North, South, East or West. What is the fewest number of steps to get back to the start?
AmbifulWorksheets
Practice that never repeats
CBSE · Class 7 · Computational Thinking and AI

Answer key

Grid Navigation and Pathfinding · AW-7CT-GRD-2026-V1 · For parents — fold back or tear off before handing the sheet to your child.

QAnswerWorking
1(d) pathfinding—
2(d) (3, 5)track the cell and the facing after each command; it ends facing North
3(c) South3 right and 0 left quarter-turns from West
4(c) 10count outwards from the robot, one ring of squares at a time, until the star is reached
5(b) 4number each square with the ways to reach it in the fewest moves; add the numbers of the squares just before it
6(c) 8write at each corner the number of ways to reach it: the corner to its left plus the corner below; the closed corner gets 0
7(d) 5it ends 3 East and 2 North of the start
8(c) L F F F Ltrace each set of commands; only one ends at the goal
9Finding a route from a start to a goal, usually the shortest or quickest one, avoiding obstacles.—
10(1, 6)track the cell and the facing after each command; it ends facing North
11South2 right and 0 left quarter-turns from North
1210count outwards from the robot, one ring of squares at a time, until the star is reached
136number each square with the ways to reach it in the fewest moves; add the numbers of the squares just before it
14112write at each corner the number of ways to reach it: the corner to its left plus the corner below; the closed corner gets 0
1519it ends 14 East and 5 North of the start
1652 across + 3 up or down
17(a) Labels give 10 routes. (b) Routes through (1, 1): 2 ways to reach it × 3 ways from it = 6, so 10 − 6 = 4 routes.—
18(a) (5, 5); (b) Westtrack the cell and the facing after each command
1912number each square with the ways to reach it in the fewest moves; add the numbers of the squares just before it
20(a) 41; (b) 10(a) write at each corner the number of ways to reach it: the corner to its left plus the corner below; the closed corner gets 0; (b) it ends 8 East and 2 North of the start