← Back to course
Python 11-12 / Week 05 / Mission Quest
6/6
Week 05 · Grids

Mission Quest

Mission Quest: The paper field
// The test field as rows and columns
⏱ about 30 min

Saturday: Mission Quest: The Paper Field

Comet lays a sheet of graph paper on the kitchen table. "No screen today," she says. "We build the field by hand."

Wren numbers the rows down the left side and the columns across the top. "What does the evidence say?" he asks. "If someone calls row 2, column 3, we should all point to the same square."

Nova projects a faint copy of the field above the paper. "How can I help?" she asks. "Copy the marks, then play the coordinates game."

Comet grins and hands you a pencil. "Lead programmer, row first. Always."

◇ THE COORDINATES GAME
You need graph paper or squared paper, a pencil and a small token.
Draw a box 6 squares wide and 5 squares tall. Number the rows 0 to 4 down the left. Number the columns 0 to 5 across the top.
Copy the field, one row at a time: ..*..#, then .#...., then ...#*., then *....., then ..#..*. Use # for rocks and * for sample spots.
Your partner calls a row and a column, like row 2, column 3. You put the token there and name the mark: open, rock or sample spot.
Your partner may call one that is off the field, like row 5, column 0. Say "out of bounds" instead of moving.
Swap roles. Then keep the paper field for next Saturday.
For a grown-up
Your learner is practicing how programs name a cell in a grid: row first, then column, both counted from 0.
Call a few cells off the edge on purpose, like row 5 or column 6. Saying "out of bounds" is the same check their code makes.
Please keep the paper field. Next Saturday's game uses it again.
  1. Row first, then column, both starting at 0.
  2. The field is 5 rows by 6 columns: 30 cells, 4 rocks, 4 sample spots.
  3. A cell is in bounds when its row is 0 to 4 and its column is 0 to 5.
WEEK 5 CHECK
  • Read the question.
  • Tap your answer.
On the field, what is at row 2, column 3?
Which of these cells is off the field?
What does grid.is_open(1, 1) give?

Great work this week. Next week Pip drives across the field, one step at a time.

← Friday