Math Bonk! Learning Centre Play the game

Worksheet for the lesson Coding Step by Step · All worksheets

Coding Step by Step

Grade 1 math worksheet · mathbonk.com/learn

Name: ______________________   Date: ____________

Look

A grid with a path from Start that goes 2 squares right, then turns and goes 3 squares up to EndStartEnd
  1. The robot walks from Start to End along the line. How many squares does it move?
  2. How many turns does the robot make?
  3. The robot faces right at the start. Is its turn a left turn or a right turn?

Practice

  1. A robot moves forward 3, then forward 2. How many squares did it move?
  2. A robot needs to move 4 squares forward. How many forward steps should the code have?
  3. Does "turn right" move the robot to a new square?
  4. The code says forward, forward, turn left, forward. How many forward steps are there?
  5. A robot is 6 squares from the door. It has moved 2. How many more forward steps does it need?
  6. The code forward, forward, forward should stop after 2 squares. What is the fix?
  7. Facing up, the robot turns right. Which way is it facing now?
  8. Facing up, the robot turns left twice. Which way is it facing now?
  9. Write the shortest code to move a robot 2 squares up, then 1 square right (start facing up).
  10. Mia's code is forward, turn right, forward. Ben's code is forward, forward. Whose code has more cards?

Think it through

  1. Draw a path for a robot: 3 squares forward, turn left, 2 squares forward.
  2. Explain what happens if a robot's code says forward, forward and a wall is 1 square away.

Challenge

  1. A robot is 8 squares from the door. Its code has 3 forward steps. How many more forward steps does it need?
  2. A robot faces up. It turns right 3 times. Which way does it face now?

Answer key

Look

  1. 5
  2. 1
  3. A left turn

Practice

  1. 5
  2. 4
  3. no
  4. 3
  5. 4
  6. remove one forward
  7. right
  8. down
  9. forward, forward, turn right, forward
  10. Mia's

Think it through

  1. A line 3 squares long, a left turn, then 2 squares
  2. It bumps into the wall; the code should have only 1 forward step

Challenge

  1. 5
  2. Left