← Back to course
Code Crew G2 / Week 10 / Thursday
4/6
Week 10 · The Bug-Hunt Method

Thursday

Find the first wrong line
// Four steps to find a bug
⏱ about 15 min
Rocket the inventor holding his engineering tablet

Find the first wrong line

Today the crew puts all four steps together.

Rocket wrote a practice flight with a check.

The ship should say safe and keep flying.

Instead, it lands early, on the soft grass.

Raven smiles. Time for the whole method.

Nova gets the logbook ready.

WARM-UP: CHECK EACH BOX
  • Read the lines.
  • Tap the answer.
set count to 2
set steps to 5
change count by 1
say count
?
set speed to 1
set fuel to 4
change fuel by 1
?
A plan logbook where row 3 is the first row that does not match

Step 4: the first wrong line

Read the logbook from the top.

Stop at the first row that does not match.

That line is the bug!

Nova the drone-bird hovering with glowing eyes

Later rows go wrong too

One bug makes the rows after it wrong.

Those rows are not new bugs.

Fix the first one, and they fix too.

set height to 1
set fuel to 3
change height by 2
lower fuel by 1
change height by 2
if height over 4
then land
otherwise say safe

The plan: height goes 1, then 3, then 4.

4 is not over 4, so Nova says safe.

HUNT WITH ALL FOUR STEPS
  • Use the whole method.
  • Tap the answer.
set height to 1
set fuel to 3
change height by 2
lower fuel by 1
change height by 2
?
set height to 1
set fuel to 3
change height by 2
lower fuel by 1
change height by 2
?
set height to 4
if height over 4
then land
otherwise say safe
?

Build the fixed first part.

Match the logbook the plan wants.

BUILD THE FIXED FLIGHT
  • Read the logbook rows.
  • Build lines that match each row.
1line 1
2line 2
3line 3
4line 4
5line 5
Raven the explorer with her wrist computer

What do you notice?

Where it looks wrong is not always the bug.

Always find the first wrong row.

job refuel:
change fuel by 2
change fuel by 2
say fuel
RUN JUST THE JOB
  • Nova runs only the refuel job.
  • Tap the answer.
set fuel to 1
do refuel
?
job refuel:
change fuel by 2
change fuel by 2
say fuel
?

Word Spot: face, watch, far

Here are new sight words.

Look at each word. Say it. Spell it.

Face: F-A-C-E.

Watch: W-A-T-C-H.

Far: F-A-R.

FIND THE WORD
  • Listen to the word.
  • Tap it.
Listen and find
?
Listen and find
?
Listen and find
?
Listen and find
?
FILL THE GAP
  • Listen to the sentence.
  • Tap the missing word.
Which word fits?
?
Which word fits?
?

You know the whole method!

Step 4 is find the first wrong line.

Later wrong rows are echoes.

You can run just one job.

Tomorrow: your own flights!

← Wednesday