Code Crew G2 / Week 01 / Wednesday
3/6
Week 01 ยท Memory and the Missing Bug

Wednesday

The newest number wins
// A memory box holds one number
โฑ about 15 min
Rocket the inventor holding his engineering tablet

Swap the number!

Raven reads the auto-pilot program again.

She finds the height box two times.

One line sets height to 2.

A later line sets height to 5.

Which number is in the box now?

Rocket wants to guess. Raven wants to test.

WARM-UP: THE BOX REMEMBERS
  • Read the program.
  • Tap how high Nova flies.
set height to 3
spin around
fly up height
?
set height to 1
fly up height
?
The old number 2 leaves the height box and 5 goes in

One box, one number

A box holds only one number.

A new set line swaps it out.

The old number is gone.

set height to 2
set height to 5
say height
Raven the explorer with her wrist computer

What do you notice?

After line one, the box holds 2.

Line two swaps in 5.

So Nova says 5.

WHAT IS IN THE BOX NOW?
  • Read every line.
  • Tap the answer.
set height to 1
set height to 4
?
set height to 6
set height to 3
say height
?
set height to 2
fly up height
set height to 5
?

Time to build!

Make Nova say 6.

Careful: there are two set cards.

MAKE NOVA SAY 6
  • Read each card.
  • Build it so Nova says 6.
1line 1
2line 2
3line 3
A logbook showing what the height box holds after each line

Nova keeps a logbook

set height to 2
set height to 5
say height
after linebox holdstrue?
line 12?
line 22?
line 35?

The newest number wins!

A box holds one number.

A new set line swaps it.

A logbook tracks the box.

Great work, Crew!

โ† Tuesday