Code Crew G2 / Week 01 / Monday
1/6
Week 01 Β· Memory and the Missing Bug

Monday

Nova has memory boxes
// A memory box holds one number
⏱ about 15 min
Rocket, Raven, and Nova the drone-bird together

Welcome to Grade 2, Crew!

The crew has a fleet of test ships.

Each ship flies with an auto-pilot program.

Test flights always stay over safe, open ground.

But something strange keeps happening.

On every flight, the ship drops down low.

It drops at the very same spot, every time.

Rocket thinks the auto-pilot has a bug.

Raven wants to find it. So do you!

WARM-UP: GRADE 1 POWERS
  • Read each little program.
  • Tap the answer.
repeat 3 times:
clap wings
?
if dark,
then flash lights
?
move up
move right
?
A test ship flight path that drops down at the same spot

The same drop, every time

Nova scans the auto-pilot program.

Nova beeps. I found a pattern!

The drop happens near a memory box.

What is a memory box? Let us find out.

Nova the drone-bird hovering with glowing eyes

Nova has memory boxes

A memory box has a name tag.

It holds one number.

Coders call a memory box a variable.

A memory box named height holding the number 3

Look inside the box

The name tag says height.

The number inside is 3.

So the height box holds 3.

set height to 3
say height
land

Set puts a number in the box.

Say makes Nova peek and say it.

Nova says 3, not the word height!

WHAT IS IN THE BOX?
  • Read the program lines.
  • Tap what the box holds.
set height to 5
?
set speed to 2
?
set height to 4
say height
?

Now you build an auto-pilot test.

Nova must say 2, then land.

Fill the box before Nova peeks!

BUILD THE AUTO-PILOT TEST
  • Read each card.
  • Make Nova say 2, then land.
1line 1
2line 2
3line 3
programNova says 3?
set height to 3, say height?
set height to 5, say height?
say height, set height to 3?
set speed to 3, say speed?

You met the memory box!

A memory box has a name.

It holds one number.

Set fills it. Say peeks inside.

Great work, Crew!